You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/12 10:59:50 UTC

[GitHub] [skywalking] kezhenxu94 commented on a diff in pull request #9775: Polish up APISIX metrics to follow Service concept

kezhenxu94 commented on code in PR #9775:
URL: https://github.com/apache/skywalking/pull/9775#discussion_r993309917


##########
oap-server/server-starter/src/main/resources/otel-rules/apisix.yaml:
##########
@@ -29,53 +29,72 @@
 #    "-P-6H+3M"  -- parses as "+6 hours and -3 minutes"
 # </pre>
 filter: "{ tags -> tags.job_name == 'apisix-monitoring' }" # The OpenTelemetry job name
-expPrefix:  tag({tags -> tags.host_name = 'apisix::' + tags.service_instance_id})
+expPrefix: tag({tags -> tags.service_name = 'APISIX::'+(tags['skywalking_service']?.trim()?tags['skywalking_service']:'APISIX')})

Review Comment:
   Try this
   
   ```suggestion
   expPrefix: tag({tags -> tags.service_name = 'APISIX::'+(tags['skywalking_service']?.trim() ?: 'APISIX')})
   ```



-- 
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-unsubscribe@skywalking.apache.org

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