feat(http): migrate HTTP conventions to Weaver schema v2 - Closes #3809#3827
feat(http): migrate HTTP conventions to Weaver schema v2 - Closes #3809#3827Dipanshusinghh wants to merge 11 commits into
Conversation
|
👋 Thanks for your contribution! This PR modifies file(s) in area(s) that do not currently have an active SIG/project:
Per the area ownership process, This does not mean your change is unwelcome:
Thanks again for taking the time to contribute! 🙏 |
There was a problem hiding this comment.
Alot of content and information would be lost with this change. At the same time un-necessary changes are bloating the diff and in fact they can lead to ci check failures. Take a look at my comments for the instances of issues which appear many times.
Please also regenerate the docs to provide context on impact to reader of the docs.
29617ec to
dddb052
Compare
dddb052 to
3c54745
Compare
thompson-tomo
left a comment
There was a problem hiding this comment.
Still a handful of unrelated/unnecessary changes which are causing issues. Please ensure after all yaml changes you are regenerating docs which will help to identify the CI issues earlier
7813a45 to
55642d6
Compare
55642d6 to
0bb3cdd
Compare
c542d87 to
444a48b
Compare
444a48b to
d9fb64c
Compare
…_level to spans and events
b6e0ec3 to
5ecc384
Compare
5ecc384 to
9ae79cd
Compare
9ae79cd to
c4021e7
Compare
thompson-tomo
left a comment
There was a problem hiding this comment.
Looking at the way public attribute groups have been used just for docs, we should be tackling #3836 first. That would enable avoidance of the public groups while still maintaining deprecated in different tables to non deprecated.
| cascade: | ||
| body_class: otel-docs-spec | ||
| github_repo: &repo https://github.com/open-telemetry/semantic-conventions | ||
| github_subdir: docs | ||
| path_base_for_github_subdir: tmp/semconv/docs/ | ||
| github_project_repo: *repo | ||
| redirects: | ||
| - { from: 'attributes-registry/*', to: 'registry/attributes/:splat' } | ||
| - { from: 'database/*', to: 'db/:splat' } | ||
| cSpell:ignore: semconv | ||
| auto_gen: below | ||
| linkTitle: Semantic conventions | ||
| weight: -2 | ||
| ---> | ||
|
|
||
| # OpenTelemetry semantic conventions | ||
| # Registry | ||
|
|
||
| The Semantic Conventions define a common set of (semantic) attributes which provide meaning to data when collecting, producing and consuming it. | ||
| The Semantic Conventions specify among other things span names and kind, metric instruments and units as well as attribute names, types, meaning and valid values. For a detailed definition of the Semantic Conventions' scope see [Semantic Conventions Stability](https://opentelemetry.io/docs/specs/otel/versioning-and-stability/#semantic-conventions-stability). | ||
| The benefit to using Semantic Conventions is in following a common naming scheme that can be standardized across a codebase, libraries, and platforms. This allows easier correlation and consumption of data. | ||
| This is an automatically generated registry of available semantic conventions. | ||
|
|
||
| Semantic Conventions are defined for the following areas: | ||
|
|
||
| * **[General](general/README.md): General Semantic Conventions**. | ||
| * [CI/CD](cicd/README.md): Semantic Conventions for CI/CD systems. | ||
| * [Cloud Providers](cloud-providers/README.md): Semantic Conventions for cloud providers libraries. | ||
| * [CloudEvents](cloudevents/README.md): Semantic Conventions for the CloudEvents specification. | ||
| * [Database](db/README.md): Semantic Conventions for database operations. | ||
| * [Exceptions](exceptions/README.md): Semantic Conventions for exceptions. | ||
| * [FaaS](faas/README.md): Semantic Conventions for Function as a Service (FaaS) operations. | ||
| * [Feature Flags](feature-flags/README.md): Semantic Conventions for feature flag evaluations. | ||
| * [Generative AI](gen-ai/README.md): Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). | ||
| * [GraphQL](graphql/README.md): Semantic Conventions for GraphQL implementations. | ||
| * [HTTP](http/README.md): Semantic Conventions for HTTP client and server operations. | ||
| * [Messaging](messaging/README.md): Semantic Conventions for messaging operations and systems. | ||
| * [Object Stores](object-stores/README.md): Semantic Conventions for object stores operations. | ||
| * [RPC](rpc/README.md): Semantic Conventions for RPC client and server operations. | ||
| * [System](system/README.md): System Semantic Conventions. | ||
|
|
||
| Semantic Conventions by signals: | ||
|
|
||
| * [Events](general/events.md): Semantic Conventions for event data. | ||
| * [Logs](general/logs.md): Semantic Conventions for logs data. | ||
| * [Metrics](general/metrics.md): Semantic Conventions for metrics. | ||
| * [Profiles](general/profiles.md): Semantic Conventions for profiles. | ||
| * [Resource](resource/README.md): Semantic Conventions for resources. | ||
| * [Trace](general/trace.md): Semantic Conventions for traces and spans. | ||
|
|
||
| Configuration: | ||
|
|
||
| * [Configuration](configuration/README.md): Semantic convention related configuration options. | ||
|
|
||
| Also see: | ||
|
|
||
| * [How to write semantic conventions](how-to-write-conventions/README.md) | ||
| * [Non-normative supplementary information](non-normative/README.md) | ||
| - [Attributes](attributes/README.md) | ||
| - [Entities](entities/README.md) |
There was a problem hiding this comment.
This should not be changed
|
|
||
| **[1] `http.request.header.<key>`:** Instrumentations SHOULD require an explicit configuration of which headers are to be captured. | ||
| Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. | ||
|
|
There was a problem hiding this comment.
Why is this being changed
|
|
||
| | Key | Stability | Value Type | Description | Example Values | | ||
| | --- | --- | --- | --- | --- | | ||
| | <a id="http-client-ip" href="#http-client-ip">`http.client_ip`</a> | <br>Replaced by `client.address`. | string | Deprecated, use `client.address` instead. | `83.164.160.102` | |
There was a problem hiding this comment.
Why is this being changed
| visibility: public | ||
| stability: development |
There was a problem hiding this comment.
Why this change? This seems really odd.
| - name: http.client.request.exception | ||
| stability: development | ||
| type: event | ||
| requirement_level: recommended |
There was a problem hiding this comment.
Is this a nice to have change or a required? If not required, leave out.
| See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes). | ||
|
|
There was a problem hiding this comment.
Why is it being removed?
| visibility: public | ||
| stability: stable |
There was a problem hiding this comment.
Why public & stable?
Thanks for the review @thompson-tomo! Public attribute_groups: Yeah, you're right this was just a quick hack to stop Weaver v2 from dumping root attributes into a fallback model.md & failing CI. Want me to block this PR on #3836 and revert this, or keep it to unblock CI?
|
|
The problem with the quick hack, once it is merged and released we are stuck having it and it can only be removed via a breaking change. I suspect we will need to wait for my pr to land as that way we can ensure that when we are switching a namespace etc we can ensure the docs are as easy as possible to review without un-necessary changes. I have just gone and commented on my pr with the instances of meaningful text disappearing from docs. We should also potentially add an attribute group registry so that the text is still visible to a reader & can remain in the docs. |
Hey @thompson-tomo, I've pushed the requested fixes (removed the attribute_groups hack and kept the required note: fields), but the CI is still failing on markdown generation due to that root attributes bug. I've been stuck trying to find a workaround for it. Do you have any better solution to get the CI green right now, or should we just leave this PR blocked until your PR #3836 is merged? |
|
@Dipanshusinghh can you fix what i just commented and if the notes are required on deprecation add the missing ` to the note to bring the diff down. Also review the diff to check un-necessary changes ie the root readme. |
| type: attribute_group | ||
| display_name: Deprecated HTTP Attributes | ||
| visibility: internal | ||
| stability: development |
There was a problem hiding this comment.
| stability: development |
| attribute_groups: | ||
| - id: registry.http.deprecated | ||
| type: attribute_group | ||
| display_name: Deprecated HTTP Attributes | ||
| visibility: internal | ||
| stability: development | ||
| brief: "Describes deprecated HTTP attributes." |
There was a problem hiding this comment.
Actually why can't we just remove the group altogether?
| deprecated: | ||
| reason: renamed | ||
| renamed_to: http.request.method | ||
| note: "Replaced by http.request.method." |
There was a problem hiding this comment.
These need the backticks to minimise diff ie
| note: "Replaced by http.request.method." | |
| note: "Replaced by `http.request.method`." |
If they need to be added.
| attribute_groups: | ||
| - id: registry.http | ||
| visibility: internal | ||
| stability: development | ||
| brief: "This document defines semantic convention attributes in the HTTP namespace." | ||
|
|
There was a problem hiding this comment.
We don't actually need this, lets remove
| - ref: server.address | ||
| requirement_level: opt_in | ||
| note: | | ||
| See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes). | ||
|
|
||
| > [!WARNING] | ||
| > Since this attribute is based on HTTP headers, opting in to it may allow an attacker | ||
| > to trigger cardinality limits, degrading the usefulness of the metric. | ||
| - ref: server.port | ||
| requirement_level: opt_in | ||
| note: | | ||
| See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes). |
There was a problem hiding this comment.
The purpose of attribute groups is to avoid adding all this duplication, let's put the old group back and use that.
| - [Mainframe](mainframe.md) | ||
| - [MCP](mcp.md) | ||
| - [Messaging](messaging.md) | ||
| - [Model](model.md) |
There was a problem hiding this comment.
Where did this come from?
There is no model.md file.
There was a problem hiding this comment.
See explanation in #3827 (comment) & in https://github.com/open-telemetry/semantic-conventions/actions/runs/28536373665/job/84598652922#step:3:1 shows it would be removed along with http, but now adds a home namespace. Hence my pr #3836 to switch to the standard attribute filter.
|
@Dipanshusinghh please take the changes from thompson-tomo@a0c77f4 and add to your branch as i can't raise a pr for your fork. Note the ci will still fail with link checks etc but it shows what you are blocked on. My pr #3836 will address those issues and it avoids the current need to rename the registry file |
| deprecated: | ||
| reason: renamed | ||
| renamed_to: http.request.method | ||
| note: "Replaced by `http.request.method`." |
There was a problem hiding this comment.
Strange that these are now required, have logged open-telemetry/weaver#1556 as this will be adding alot of un-necessary boilerplate.
There was a problem hiding this comment.
Hey @thompson-tomo,
Thanks for the help! Ihave fetched and applied your commit (a0c77f4) to my branch as requested.
I see the CI is still failing on link checks as expected due to the Weaver definition/2 issue i understand that this PR is now blocked until your PR #3836 is merged to fix the underlying tool issue
thnx for the help !
There was a problem hiding this comment.
Correct this is now blocked until we have a solution for the attributes in the wrong namespace issue which my pr solves.
I have managed to descope my pr to avoid namespaces which had meaningful text which should make it easier to review.
| kind: client | ||
| requirement_level: recommended | ||
| name: | ||
| note: "{http.request.method}" |
There was a problem hiding this comment.
This should be a copy of what is in the span note field.
| kind: server | ||
| requirement_level: recommended | ||
| name: | ||
| note: "{http.request.method} {http.route}" |
There was a problem hiding this comment.
This should be a copy of what is in the span note field.
|
Hi @Dipanshusinghh turns out we are not so ready to start migrating stuff as I thought we were. I'm closing this for now, we are re-grouping and looking into the new plan (see parent issue). |
Closes #3809
Migrated 6 HTTP YAML files from Weaver v1 to v2 format:
file_format: definition/2to all filesgroups:toattribute_groups:,spans:,metrics:,events:extends:toref_group:id:tokey:(attributes) andname:(spans/metrics)visibility: publicandstability: developmentto attribute groupsThis is a prototype migration as described in the issue.
Open to feedback on any gaps or improvements needed.
Merge requirement checklist