-
Notifications
You must be signed in to change notification settings - Fork 50
Add OpenTelemetry guidelines doc #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,39 @@ | ||||||
| # OpenTelemetry Guidelines | ||||||
|
|
||||||
| This document provides guidance for language instrumentation agents that use | ||||||
| OpAMP. | ||||||
|
|
||||||
| ## Scope | ||||||
|
|
||||||
| This guidance is intended for OpenTelemetry language agents that run as part of an instrumented | ||||||
| application process. Examples include auto-instrumentation language agents and similar | ||||||
| instrumentation runtimes built with OpenTelemetry SDKs. | ||||||
|
|
||||||
| This guidance does not apply to standalone agents such as the OpenTelemetry | ||||||
| Collector. | ||||||
|
|
||||||
| ## Identifying Attributes | ||||||
|
|
||||||
| Language instrumentation agents MUST copy the following OpenTelemetry SDK | ||||||
| `Resource` attributes into `AgentDescription.identifying_attributes`: | ||||||
|
|
||||||
| - `service.name` | ||||||
| - `service.instance.id` | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it intentional to be here? I am pretty sure that it was common behavior in other technologies at the time of implementation.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't suggest it, but I understood it to be intentional, yes. Without it, you're just left with |
||||||
| - `service.namespace.name`, if present | ||||||
|
|
||||||
| These identifying attributes MUST match the values that the agent uses in the | ||||||
| Resource of its own telemetry. | ||||||
|
|
||||||
| ## Non-identifying Attributes | ||||||
|
|
||||||
| Language instrumentation agents SHOULD copy all other OpenTelemetry SDK | ||||||
| `Resource` attributes into `AgentDescription.non_identifying_attributes`, | ||||||
| excluding those added to the identifying attributes (above). | ||||||
|
|
||||||
| ## Rationale | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Mostly a nit: not sure whether this section or the identifying attributes section would be better, but shouldn't this be nested under one of those two? I don't think this rationale necessarily applies to the whole document. |
||||||
|
|
||||||
| For language instrumentation agents, the `service.*` attributes listed above | ||||||
| define the identity that OpAMP uses to associate an agent with its telemetry. | ||||||
| Copying the remaining Resource attributes into | ||||||
| `AgentDescription.non_identifying_attributes` preserves useful descriptive | ||||||
| context without expanding the agent identity beyond those service attributes. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) Can we settle on using a single term? Previously we have
Personally, I am not a fan of using the "agent" term. I suggest "component" or "runtime" or "implementation" (I do not have any strong opinion). I think the sentence below is the only one that where using "agent" is fine (however, we could also use zero-code instrumentation to align with https://opentelemetry.io/)
What matters for me the most is having consistent terminology used in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's indeed a nit, and I don't feel that strongly about it. With whatever term you go with, you'll have people wondering about the other term. Using both helps to suggest that both are valid, but whatever, I get it....and I agree that "agent" is criminally overloaded. Not sure which term is the preferred term of art anymore honestly....