Skip to content

RFC 0060: Add gen_ai.tool.source.* and gen_ai.usage.cache_*.input_tokens - #2711

Merged
trisch-me merged 7 commits into
elastic:mainfrom
angelosoliveira:rfc-0060-gen_ai-tool-source-and-cache-tokens
Nov 5, 2026
Merged

trisch-me merged 7 commits into
elastic:mainfrom
angelosoliveira:rfc-0060-gen_ai-tool-source-and-cache-tokens

Conversation

@angelosoliveira

Copy link
Copy Markdown
Contributor

Summary

Proposal RFC to add five fields to the existing gen_ai fieldset (target maturity: beta):

  • gen_ai.tool.source.name, gen_ai.tool.source.type, gen_ai.tool.source.address: where a tool came from (MCP server, gateway target, registry, request-defined). Needed to detect look-alike tools and changed tool definitions (OWASP ASI02).
  • gen_ai.usage.cache_read.input_tokens, gen_ai.usage.cache_write.input_tokens: match the OTel GenAI attributes of the same name, and are already logged by Bedrock and the OpenAI Responses API.

This is a documentation-only Proposal PR per rfcs/PROCESS.md: rationale, field YAML and example events. Schema application to schemas/gen_ai.yml follows after acceptance.

Changes

  • rfcs/text/0060-gen_ai-tool-source-and-cache-tokens.md
  • rfcs/text/0060/gen_ai.yaml

Why

gen_ai.tool.* identifies a tool by name only, so two tools with the same or similar name from different sources cannot be told apart, and a changed definition cannot be told from a re-advertised one. The cache token fields close a gap between ECS and OTel for data that providers already emit. Tracked in the GenAI detections epic: elastic/integrations#20737.

Test plan

  • ECS team reviews Proposal (maturity: beta)
  • The RFC number is the next available one (0059 is used by [RFC 0059] Add as.type field #2706; any duplicate is corrected at merge)
  • On merge, add the fields to schemas/gen_ai.yml (or rely on post-merge automation when available)

Related

@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@angelosoliveira

Copy link
Copy Markdown
Contributor Author

Tracking issue: #2712

@angelosoliveira
angelosoliveira marked this pull request as ready for review October 28, 2026 16:52
@angelosoliveira
angelosoliveira requested a review from a team October 28, 2026 16:52
Per review, these fields have no OTel definition yet, so leave the mapping out instead of declaring relation: na, which is for fields that will never be in semconv.

@taylor-swanson taylor-swanson 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.

Overall seems reasonable to me. I'll let @trisch-me comment on anything OTel-related, if necessary.

Comment thread rfcs/text/0060/gen_ai.yaml Resolved

@trisch-me trisch-me 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.

left some comments, needs to be addressed.

Define the tool.source.type values (including inline) and add examples to the field descriptions and a table, compare gen_ai.tool.type with gen_ai.tool.source.type, and remove the OTel 'related' relation from tool.source.address together with the server.* concern that justified it.
Comment thread rfcs/text/0060/gen_ai.yaml Resolved
@trisch-me
trisch-me merged commit da03add into elastic:main Nov 5, 2026
8 checks passed
trisch-me added a commit that referenced this pull request Nov 12, 2026
…ut_tokens (#2713)

* feat(otel): align ECS with OTel semconv 1.44.0

- Bump otel-semconv-version to v1.44.0 and update USAGE.md examples.
- Support the `definition/2` model format in the OTel generator.
- Load GenAI attributes from open-telemetry/semantic-conventions-genai,
  as they were deprecated in the main semconv repo.
- Remove the OTel mapping of `gen_ai.token.type`, dropped upstream.
- Add `match` mappings for `user_agent.os.name` and `user_agent.os.version`.
- Add `equivalent` mappings for `process.start`, `process.end`,
  `process.exit_code`, `process.parent.pid` and `event.original`, and a
  `related` mapping for `process.name`.
- Regenerate artifacts and docs.

Relates to #2708

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: use PR number in changelog entry

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: address Vale warnings in event.original description

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Implement RFC 0060: gen_ai.tool.source.* and gen_ai.usage.cache_*.input_tokens

Apply field definitions from RFC 0060 to schemas/gen_ai.yml,
regenerate all artifacts, and add changelog entry.

Ref: #2711

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants