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


##########
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"

Review Comment:
   If this is impossible(if there is no value to have metadata in OTLP push), I 
think we should recommend using K8s sidecar as recommended deployment to add 
this label. In there, we could use pod name as the instance name, and k8s 
service name as the service name.
   
   Meanwhile, is `host_name` representing the service name?



-- 
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