Hi,

OpenTelemetry Resource is once created at the OpenTelemetry initialization
at the node start up and never change as it describes the source of
telemetry,
which is an Apache Cassandra node in our case.

> Will the CEP also support a session-scoped mode (e.g., via the STARTUP
message) for attributes that remain constant over the lifetime of a
connection?

Apache Cassandra holds ClientState per connection, which is the closest
thing (session-scoped object) available, and we can associate info there as
otel attributes.
For example, a client IP address associated with spans is set from
ClientState#getClientAddress.
STARTUP message options are also stored in ClientState, so I think what you
are describing can be already done.


On Wed, Sep 24, 2025 at 1:57 AM Jaydeep Chovatia <chovatia.jayd...@gmail.com>
wrote:

> In the current OpenTelemetry CEP, context propagation is described at the 
> query
> level using W3C Trace Context in the custom payload. My question is:
>
> Will the CEP also support a session-scoped mode (e.g., via the STARTUP
> message) for attributes that remain constant over the lifetime of a
> connection?
>
> The idea is to do a hybrid approach as:
>
>    -
>
>    Session-scoped attributes → sent once at connection initialization,
>    aligning with OTel *Resource attributes*.
>    -
>
>    Query-scoped attributes → sent with each operation, aligning with OTel 
> *Span
>    attributes*.
>
> This could reduce duplication of static values while still providing full
> observability at the query level.
>
> Jaydeep
>
> On Mon, Sep 22, 2025 at 7:48 AM Yuki Morishita <yu...@apache.org> wrote:
>
>> One of the goal of the CEP is to define how drivers can send the tracing
>> context to Apache Cassandra through native protocol.
>> Implementation in driver side is out of scope for now, but once CEP is
>> accepted, any driver can implement it according to the standard defined.
>>
>> On Mon, Sep 22, 2025, 8:43 PM Johnny Miller <johnny.p.mil...@gmail.com>
>> wrote:
>>
>>> One question would be around the support for this in the other drivers,
>>> not just Java. It would be good to understand the plan for those as part of
>>> this CEP?
>>>
>>> On Mon, 22 Sept 2025 at 07:36, Yuki Morishita <yu...@apache.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'd like to propose CEP-32 OpenTelemetry tracing integration (1) so
>>>> Apache Cassandra can export its tracing telemetry in OpenTelemetry 
>>>> standard.
>>>>
>>>> The original draft of the proposal was integrating not only tracing but
>>>> also metrics and logs, however, the latest proposal reduced the scope so we
>>>> can get started in integrating OpenTelemetry standard.
>>>>
>>>> I'd like the opinion in 4 topics below:
>>>>
>>>> * How to configure OpenTelemetry
>>>> * The way of propagating Context
>>>> * Resource definition to describe Apache Cassandra node as a
>>>> telemetry source
>>>> * Span creation and its attributes
>>>>
>>>> Regards,
>>>> Yuki
>>>>
>>>> 1:
>>>> https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-32%3A+OpenTelemetry+tracing+integration
>>>>
>>>

Reply via email to