Skip to content

rename rpc.response.status_code to rpc.status_code#3921

Open
lmolkova wants to merge 5 commits into
open-telemetry:mainfrom
lmolkova:rpc-status-code
Open

rename rpc.response.status_code to rpc.status_code#3921
lmolkova wants to merge 5 commits into
open-telemetry:mainfrom
lmolkova:rpc-status-code

Conversation

@lmolkova

Copy link
Copy Markdown
Member

Fixes #3870

Based on the analysis in the issue:

  • in gRPC-based / compatible RPCs, code does not come as a part of response and is not associated with the response. "Response status code" is not a common phrase and sounds wrong
  • we added respose namespace to stay consistent with http and db. In HTTP status IS part of response, in SQL SQLSTATE is also part of response. And there it makes sense.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Links to prototypes or existing instrumentations (when adding or changing conventions)
  • Disclose AI usage, see OTel GenAI policy:
    • no AI used
    • AI-assisted
    • bulk AI-generated
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR.1

Footnotes

  1. Yes, I can answer maintainer questions about the content of this PR without using AI.

@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:

  • mcp

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! 🙏

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 23, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-25 12:00:11 UTC.

  • Waiting on: Reviewers
  • Next step: Review the latest changes.

This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected.

Copilot AI 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.

Pull request overview

This PR updates the RPC semantic conventions by renaming the attribute rpc.response.status_code to rpc.status_code, reflecting that (e.g., in gRPC-compatible systems) the status code is not inherently a “response” property, and ensuring the model/docs stay consistent with the updated naming.

Changes:

  • Rename the canonical RPC status code attribute to rpc.status_code and update references across RPC spans/metrics models and documentation.
  • Deprecate rpc.response.status_code as a renamed alias pointing to rpc.status_code.
  • Add a breaking-change changelog entry for the rename.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
model/rpc/spans.yaml Updates span definitions to reference rpc.status_code instead of rpc.response.status_code.
model/rpc/registry.yaml Renames the registered attribute id to rpc.status_code and updates its note text accordingly.
model/rpc/deprecated/registry-deprecated.yaml Adds deprecated alias rpc.response.status_code renamed to rpc.status_code; updates other deprecated guidance to reference the new name.
model/rpc/common.yaml Updates common RPC attribute references to rpc.status_code (note text still mentions “response status code”).
model/otel/metrics.yaml Updates OTEL SDK metric attribute reference to rpc.status_code.
model/mcp/deprecated/common-deprecated.yaml Updates MCP deprecated conventions to reference rpc.status_code.
docs/rpc/rpc-spans.md Updates RPC spans doc tables/prose to use rpc.status_code.
docs/rpc/rpc-metrics.md Updates RPC metrics doc tables/prose to use rpc.status_code.
docs/rpc/json-rpc.md Updates JSON-RPC doc tables/prose to use rpc.status_code.
docs/rpc/grpc.md Updates gRPC doc tables/prose to use rpc.status_code.
docs/rpc/dubbo.md Updates Dubbo doc tables/prose to use rpc.status_code.
docs/rpc/connect-rpc.md Updates Connect-RPC doc tables/prose to use rpc.status_code.
docs/registry/attributes/rpc.md Updates generated registry docs to show rpc.status_code as current and rpc.response.status_code as deprecated.
docs/otel/sdk-metrics.md Updates OTEL SDK metrics documentation to reference rpc.status_code.
docs/non-normative/rpc-migration.md Updates migration guidance to the new attribute name (but currently loses the intermediate historical step from prior versions).
docs/non-normative/compatibility/grpc.md Updates the gRPC compatibility mapping to reference rpc.status_code.
.chloggen/3919.yaml Adds breaking-change changelog entry for the rename.
Comments suppressed due to low confidence (2)

docs/non-normative/rpc-migration.md:120

  • These metric migration tables now say "New: rpc.status_code" in #2920, but #2920 introduced rpc.response.status_code (as shown by the removed lines in this PR). Consider keeping the original "New" row and adding a separate rename row for this PR, to preserve the timeline for readers migrating across versions.
| New: `rpc.status_code`       | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) |                                                                                             |

docs/non-normative/rpc-migration.md:152

  • Same as above for the client metric table: keeping "New: rpc.response.status_code" in #2920 and adding a separate rename row for this PR avoids losing the intermediate step for migrations.
| New: `rpc.status_code`       | [#2920](https://github.com/open-telemetry/semantic-conventions/pull/2920) |                                                                                             |

Comment thread docs/non-normative/rpc-migration.md Outdated
Comment thread model/rpc/common.yaml Outdated
Comment thread model/mcp/deprecated/common-deprecated.yaml Outdated
@lmolkova lmolkova moved this from Untriaged to Needs More Approval in Semantic Conventions Triage Jul 23, 2026
@lmolkova lmolkova moved this from Done to In Progress in RPC Semantic Conventions Stability Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs More Approval

Development

Successfully merging this pull request may close these issues.

gRPC : rpc.response.status_code should be changed to more appropriate name

3 participants