Skip to content

Wrap OTel Resource message with top-level ProcessContext message#53

Merged
felixge merged 4 commits intoopen-telemetry:mainfrom
ivoanjo:ivoanjo/replace-process-context-payload
Feb 18, 2026
Merged

Wrap OTel Resource message with top-level ProcessContext message#53
felixge merged 4 commits intoopen-telemetry:mainfrom
ivoanjo:ivoanjo/replace-process-context-payload

Conversation

@ivoanjo
Copy link
Copy Markdown
Contributor

@ivoanjo ivoanjo commented Feb 6, 2026

What does this PR do?

This PR updates the C/C++ reference implementation to introduce top-level ProcessContext message that wraps the previous Resource message.

Motivation:

Having a top-level ProcessContext message gives us more flexibility to evolve the ProcessContext in the future without directly depending on Resource, as well as to introduce attributes that are not considered part of the Resource and that may need to
be updated from time to time.

Additional Notes:

Currently every attribute provided to the library ends up inside the resource; I plan to later extend this to allow attributes to be provided that end up inside the extra_attributes.

How to test the change?

The built-in decoder and otel_process_ctx_dump.sh have been updated to match.

**What does this PR do?**

This PR updates the C/C++ reference implementation to introduce
top-level `ProcessContext` message that wraps the previous `Resource`
message.

**Motivation:**

Having a top-level `ProcessContext` message gives us more flexibility
to evolve the `ProcessContext` in the future without directly
depending on `Resource`, as well as to introduce attributes that
are not considered part of the `Resource` and that may need to
be updated from time to time.

**Additional Notes:**

N/A

**How to test the change?**

The built-in decoder and `otel_process_ctx_dump.sh` have been updated
to match.
@ivoanjo ivoanjo requested a review from a team as a code owner February 6, 2026 13:38
ivoanjo added a commit to ivoanjo/proc-level-demo that referenced this pull request Feb 6, 2026
}
char *ptr = encoded;

// ProcessContext.resource (field 1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Maybe if you do additional modifications in the future to address OTEP comments, add 1-2 attributes in extra_attributes to demonstrate non-resource attribute handling.

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.

Yeap, sounds good! I need to make a few tweaks to support the thread context which is an extra_attribute so I'll include that as well.

Copy link
Copy Markdown
Member

@felixge felixge left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@felixge felixge merged commit 1b86b42 into open-telemetry:main Feb 18, 2026
1 check passed
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