open-telemetry / opentelemetry-android

OpenTelemetry Tooling for Android
Apache License 2.0
121 stars 27 forks source link

Rename transaction #325

Open baudouxbenjamin opened 3 months ago

baudouxbenjamin commented 3 months ago

Hello,

We're using elastic on Android and for now every transactions are under something like GET, POST, etc. I'd like to rename my transactions to GET my-service.be/data for example to make it easier to find.

Is it possible? If not, is it planned in a future release?

Thanks!

breedx-splk commented 3 months ago

Hi @baudouxbenjamin . The names of the spans generated by this instrumentation should comply with the OpenTelemetry HTTP semantic conventions.

If you check that link, you'll see that the guidance for client http spans is:

HTTP client spans have no http.route attribute since client-side instrumentation is not generally aware of the “route”, and therefore HTTP client span names SHOULD be {method}.

So I don't think we have any real intention to change this. You can always put manual instrumentation around these call sites, if you'd like to get more details in the name.

LikeTheSalad commented 3 months ago

I agree we should stick to the semconv, however, it does mention that we could add the HTTP route (if we knew what it was) though we don't know, so it makes sense we don't do it and I don't think OTel Android should try to make any "smart" decisions on what the HTTP route should look like.

Still, I think we could at least provide some APIs to allow users to add the route themselves, maybe in a similar fashion to what someone's suggested doing for screen names.

github-actions[bot] commented 2 months ago

This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 21 days. It will be closed automatically if there is no response from the author within 14 additional days from this comment.

LikeTheSalad commented 2 months ago

There has been some progress around this issue in the Java SIG and also here. I'm planning to add a config option for it soon.