wu-sheng commented on code in PR #12072:
URL: https://github.com/apache/skywalking/pull/12072#discussion_r1555122490


##########
test/e2e-v2/cases/airflow/airflow-exporter/otel-collector-config.yaml:
##########
@@ -0,0 +1,69 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+receivers:
+  otlp:
+    protocols:
+      http:
+        endpoint: "0.0.0.0:8889" # Receiver configuration using the OTLP 
protocol over HTTP, listening Airflow on port 8889
+
+exporters:
+  otlp:
+    endpoint: "oap:11800" # Exporter configuration, sending data to the 
specified endpoint address
+    tls:
+      insecure: true # Disables TLS security or TLS certificate verification 
in the testing environment
+
+processors:
+  transform:
+    metric_statements:
+      - context: resource
+        statements: []
+      - context: metric
+        statements:
+          - set(name, ConvertCase(name, "snake")) # Transform metric names to 
snake case
+
+  metricstransform:
+    transforms:
+      - include: "^airflow.*" # Select metrics starting with 'airflow' for 
transformation
+        match_type: regexp # Use regular expression for matching metric names
+        action: update
+        operations:
+          - action: add_label
+            new_label: job_name # Add a new label 'job_name' to the selected 
metrics
+            new_value: "airflow-monitoring"
+      - include: "^airflow.*"
+        match_type: regexp
+        action: update
+        operations:
+          - action: add_label
+            new_label: service_instance_id # Add 'service_instance_id' label 
to metrics
+            new_value: "instance1"
+      - include: "^airflow.*"
+        match_type: regexp
+        action: update
+        operations:
+          - action: add_label
+            new_label: host_name # Add 'host_name' label indicating the host 
name
+            new_value: "airflow-webserver.airflow"

Review Comment:
   If this is the service name, and hard coded instance name, I doubt the 
service and instance hierarchy would work.
   I saw your screenshot, but that seems not match your e2e.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to