-
Notifications
You must be signed in to change notification settings - Fork 888
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
Add telemetry.source attribute namespace #2192
Conversation
First of all, I think
|
| `telemetry.source.name` | string | Logical name of the source of the telemetry data. [1] | `shoppingcart` | Yes | | ||
| `telemetry.source.namespace` | string | A namespace for `telemetry.source.name`. [2] | `Shop` | No | | ||
|
||
**[1]:** If the value was not specified, SDKs MUST fallback to `unknown_source`. |
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.
I think we had proposed this would fallback to service.name
here, for backwards compatibility with the previous specification.
@@ -65,7 +83,7 @@ as specified in the [Resource SDK specification](../sdk.md#sdk-provided-resource | |||
<!-- semconv service --> | |||
| Attribute | Type | Description | Examples | Required | | |||
|---|---|---|---|---| | |||
| `service.name` | string | Logical name of the service. [1] | `shoppingcart` | Yes | | |||
| `service.name` | string | Logical name of the service. [1] | `shoppingcart` | No | |
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.
If we remove this as required, we'll need to document what we migrated to.
Again, if we think of the specification as an API users consume, then we need to verify this isn't breaking.
We discussed using telemetry.source.*
as the new service.name
, but what does removing this as required due to expectations of users? I think in the meeting we had talked about some kind of backfill mechanic where telemetry.source.*
would be inserting here on-demand to prevent breakages.
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.
@jsuereth I am not sure how to verify that it's not breaking in all SDKs. I am guessing that if implemented correctly, it will default to unknown_service
when not provided. I think potentially the bigger challenge is that backends might be expecting service.name
to be present. So, perhaps I can leave it as required for resources that describe an actual service, with the value being the same as telemetry.source.name
.
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.
I think I'd suggest the later. One of my crazy ideas was to have something where when a user asks for service.name
they automatically get telemetry.source.name
at the API level, e.g. see: open-telemetry/oteps#161 which did not get enough approvals, but would have helped us in this scenario.
Where in the spec does this say that it is required for any telemetry data? As far as I can see it is required for a Service. Is there a stricter requirement somewhere?
Please post the summary of the discussion and the rationale why service.name is not good enough. We need to capture it here and have broader discussion, online discussions are not sufficient for decisions of this sort that can have broad implications. |
From how I read the spec it is required for any telemetry source:"The SDK MUST provide access to a Resource with at least the attributes listed at Semantic Attributes with SDK-provided Default Value." (source) following that link: *"These are the attributes which MUST be provided by the SDK as specified in the Resource SDK specification:
-- I read that in a way that every telemetry source is a service and the argument against that is that a browser/mobile app is not a service, but an app (and the same is true for other things that might send OTel data in the future)
The initial discussion started in this PR #2111, which is conflicting with this PR #2115, coming from the Client Side Telemetry SIG:
So the discussion is spread out over those 3 (and maybe some meeting notes?)
Sounds like this requires an OTEP to consolidate? |
I think this definitely warrants an OTEP. There are several elements in this discussion which are unclear to me and which I am not sure I agree with. These need to be discussed more thoroughly. An OTEP would help a lot. At the moment I see 2 possibilities to move forward:
As a side note, I am not sure that the existing requirement that all telemetry produced by Otel SDK must have a |
That was already done in #2111. The objections were not to the definition, but to the name "service". My preference is option-1, for consistency. |
That's my preference as well. |
|
<!-- semconv service --> | ||
| Attribute | Type | Description | Examples | Required | | ||
|---|---|---|---|---| | ||
| `telemetry.source.name` | string | Logical name of the source of the telemetry data. [1] | `shoppingcart` | Yes | |
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.
What would be the telemetry.source.name
for a metric collected from a Kubernetes cluster, e.g. CPU usage of a Kubernetes Node? We have k8s.node.*
attributes for this. Will telemetry.source.name
be a duplicate of k8s.node.name
? Similarly, will telemetry.source.namespace
be a duplicate of k8s.namespace
?
Are we requiring that every specific technology for which we already have well-defined set of identifying attributes also duplicates the values of those attributes in telemetry.source.name
and telemetry.source.namespace
? We have such specific definitions for several Kubernetes entities, for OS processes, for FaaS functions, etc. I fail to see how this attempt to generalize works in the presence of those specific semantic conventions.
It looks to me like the present-day Can we refactor today's specification so that wherever we have |
That requirement is defined in https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions which is marked Experimental, so presumably it can be undone or modified, right? |
I think the other way out would be to allow SDKs to provide a configuration option to ignore this requirement. Then, client-specific distributions (for swift, android, js) could be provided that have this set out of the box. |
I am in favour of removing the requirement altogether. What is preventing the removal? Exporters who send to backends that require it can deal with the problem. |
I also prefer the option 1 from @tigrannajaryan 's options list, to generalize the meaning of "service" (OR to completely rename to "source" if we cannot generalize "service"). I personally think would be a mistake to have multiple entries "source", "app", "service" that will only confuse more the users and complicate things. @martinkuba can you clarify what "client-side" means for you? In a microservice infrastructure a "client" is another service, in a web-application you can refer as "client-side" to the app/service/client that runs in the browser, in a mobile app you can refer to the app itself but also an intermediate service in a chain of service calls. Too many possibilities. |
I also think that having multiple attributes that mean the same thing would be confusing (like
By client-side, we mean applications that runs in client devices and that end-users interact with directly - web apps running in browsers, mobile apps on mobile devices etc. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Currently the
service.name
attribute is required for any telemetry data. There is a need to distinguish client-side telemetry from backend (service) telemetry. This related PR is proposing a new set of attribute to describe client-side applications. The implication is thatservice.*
attributes would be used only for telemetry coming from backend services, and as a resultservice.name
should not be required for client-side resources.This has been discussed in the Specs SIG and Client-side SIG, and the outcome of the discussion has been to propose a new attribute that would be used for generic description of the source of the telemetry. In addition to that,
service
and/orapp
attributes could also be present depending on the type of the telemetry.Requirements for this change