honeycombio / honeycomb-network-agent

Apache License 2.0
3 stars 1 forks source link

user_agent isn't being set correctly #328

Closed akvanhar closed 10 months ago

akvanhar commented 10 months ago

We're not registering any versions after 0.0.23-alpha https://ui-dogfood.honeycomb.io/prod/environments/prod/datasets/shepherd/result/52aSLSFDDqo

JamieDanielson commented 10 months ago

It seems that we appended user agent when using libhoney-style events, but did not do the same when we switched over to OTel. Looking further into this, I'm not positive if we actually want to update the User Agent. Right now, the user agent captured is the user agent of the http request itself, such as curl/7.68.0 or Go-http-client/1.1. When User Agent is implemented in SDKs it is a default for an exporter, with the ability to overwrite. I've opted to add resource attributes similar to what we've done in our distros in the past, in #331 . Curious if that solves what we're ultimately trying to do, which is to make it easier to distinguish where telemetry is coming from.

MikeGoldsmith commented 10 months ago

I think this is the correct decision. The event represents the observed action, which in the case of a HTTP request includes the UserAgent attribute for the request. Adding the network agent into or replacing that value doesn't make sense because it didn't participate in the request, it just saw it.

Adding resource attributes to the event to indicate the the event was captured by the agent makes sense and shows capture did not interfere with the actual network request.

Closing as #331 has now merged.