Skip to content

feat(http): migrate HTTP conventions to Weaver schema v2 - Closes #3809#3827

Closed
Dipanshusinghh wants to merge 11 commits into
open-telemetry:mainfrom
Dipanshusinghh:migrate-http-conventions-v2
Closed

feat(http): migrate HTTP conventions to Weaver schema v2 - Closes #3809#3827
Dipanshusinghh wants to merge 11 commits into
open-telemetry:mainfrom
Dipanshusinghh:migrate-http-conventions-v2

Conversation

@Dipanshusinghh

@Dipanshusinghh Dipanshusinghh commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Closes #3809

Migrated 6 HTTP YAML files from Weaver v1 to v2 format:

  • Added file_format: definition/2 to all files
  • Converted groups: to attribute_groups:, spans:, metrics:, events:
  • Changed extends: to ref_group:
  • Changed id: to key: (attributes) and name: (spans/metrics)
  • Added visibility: public and stability: development to attribute groups

This is a prototype migration as described in the issue.
Open to feedback on any gaps or improvements needed.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • AI-assisted: Used AI to understand v2 schema, all changes done manually.
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR.

@github-actions

Copy link
Copy Markdown

👋 Thanks for your contribution!

This PR modifies file(s) in area(s) that do not currently have an active SIG/project:

  • http
  • http

Per the area ownership process,
changes to these areas need an active SIG/project, so this PR has been automatically
closed and labeled triage:rejected:declined.

This does not mean your change is unwelcome:

  • For substantial changes or new conventions: Consider starting a new SIG/project.
    See the Project Management guide.
  • If you believe this was closed in error: Please reach out in the
    #otel-semantic-conventions channel on the CNCF Slack.

Thanks again for taking the time to contribute! 🙏

@thompson-tomo thompson-tomo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread model/http/common.yaml
Comment thread model/http/deprecated/registry-deprecated.yaml
Comment thread model/http/deprecated/registry-deprecated.yaml
Comment thread model/http/common.yaml Outdated
Comment thread model/http/common.yaml
Comment thread model/http/common.yaml Outdated
Comment thread model/http/common.yaml
Comment thread model/http/common.yaml Outdated
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from 29617ec to dddb052 Compare June 28, 2026 21:41
@Dipanshusinghh
Dipanshusinghh requested review from a team as code owners June 28, 2026 21:41
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from dddb052 to 3c54745 Compare June 28, 2026 22:07

@thompson-tomo thompson-tomo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread model/http/deprecated/registry-deprecated.yaml Outdated
Comment thread docs/non-normative/groups/system/cpu-metrics-guidelines.md Outdated
Comment thread .markdownlint-cli2.yaml Outdated
Comment thread model/http/events.yaml
Comment thread model/http/events.yaml
Comment thread model/http/deprecated/registry-deprecated.yaml Outdated
Comment thread model/http/metrics.yaml Outdated
Comment thread model/http/metrics.yaml Outdated
Comment thread model/http/metrics.yaml Outdated
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch 2 times, most recently from 7813a45 to 55642d6 Compare June 29, 2026 19:01
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from 55642d6 to 0bb3cdd Compare June 29, 2026 19:17
@github-actions github-actions Bot added the enhancement New feature or request label Jun 29, 2026
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch 4 times, most recently from c542d87 to 444a48b Compare June 29, 2026 19:48
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from 444a48b to d9fb64c Compare June 29, 2026 19:59
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from b6e0ec3 to 5ecc384 Compare June 29, 2026 20:23
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from 5ecc384 to 9ae79cd Compare June 29, 2026 20:41
@Dipanshusinghh
Dipanshusinghh force-pushed the migrate-http-conventions-v2 branch from 9ae79cd to c4021e7 Compare June 29, 2026 20:44

@thompson-tomo thompson-tomo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/README.md Outdated
Comment on lines +2 to +10
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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> | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `client.address`. | string | Deprecated, use `client.address` instead. | `83.164.160.102` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being changed

Comment on lines +5 to +6
visibility: public
stability: development

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? This seems really odd.

Comment thread model/http/events.yaml
- name: http.client.request.exception
stability: development
type: event
requirement_level: recommended

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a nice to have change or a required? If not required, leave out.

Comment thread model/http/metrics.yaml
Comment on lines -10 to -11
See [Setting `server.address` and `server.port` attributes](/docs/http/http-spans.md#setting-serveraddress-and-serverport-attributes).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it being removed?

Comment thread model/http/registry.yaml Outdated
Comment on lines +5 to +6
visibility: public
stability: stable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why public & stable?

Comment thread docs/registry/attributes/README.md Outdated
@Dipanshusinghh

Dipanshusinghh commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

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.

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?

  • Missing server.address note: Ah, my bad! Accidentally dropped it during the ref conversion. I'll restore it.
  • events.yaml requirement_level: Had to add this to pass strict CI validation (it was throwing a fatal error).
  • http.md formatting & redundant note: The formatting changes were auto-generated by Weaver. I'll remove the redundant note in registry-deprecated.yaml.
    Let me know on [chore] switch weaver to builtin attribute filter #3836, and I'll push the other fixes!

@thompson-tomo

thompson-tomo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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.

@Dipanshusinghh

Copy link
Copy Markdown
Contributor Author

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?

@thompson-tomo

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stability: development

Comment on lines 3 to 7
attribute_groups:
- id: registry.http.deprecated
type: attribute_group
display_name: Deprecated HTTP Attributes
visibility: internal
stability: development
brief: "Describes deprecated HTTP attributes."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually why can't we just remove the group altogether?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

deprecated:
reason: renamed
renamed_to: http.request.method
note: "Replaced by http.request.method."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need the backticks to minimise diff ie

Suggested change
note: "Replaced by http.request.method."
note: "Replaced by `http.request.method`."

If they need to be added.

Comment thread model/http/registry.yaml Outdated
Comment on lines +3 to +8
attribute_groups:
- id: registry.http
visibility: internal
stability: development
brief: "This document defines semantic convention attributes in the HTTP namespace."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't actually need this, lets remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread model/http/metrics.yaml Outdated
Comment on lines +85 to +96
- 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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of attribute groups is to avoid adding all this duplication, let's put the old group back and use that.

Comment thread docs/registry/attributes/README.md Outdated
- [Mainframe](mainframe.md)
- [MCP](mcp.md)
- [Messaging](messaging.md)
- [Model](model.md)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this come from?
There is no model.md file.

@thompson-tomo thompson-tomo Jul 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@thompson-tomo

thompson-tomo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@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`."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange that these are now required, have logged open-telemetry/weaver#1556 as this will be adding alot of un-necessary boilerplate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 !

@thompson-tomo thompson-tomo Jul 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread model/http/spans.yaml Outdated
kind: client
requirement_level: recommended
name:
note: "{http.request.method}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a copy of what is in the span note field.

Comment thread model/http/spans.yaml Outdated
kind: server
requirement_level: recommended
name:
note: "{http.request.method} {http.route}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a copy of what is in the span note field.

@joaopgrassi

Copy link
Copy Markdown
Member

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).

@joaopgrassi joaopgrassi closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Schema v2] Migrate HTTP conventions

4 participants