You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
As discussed in our last meeting, I've created a POC for this feature.
Implementation
I've created a separate project with a dependency on opencensus-node.
There I've extended Span as TypedSpan to accept a type attribute that has the type CanonicalType
I've created an Interface HTTPClientTypedSpan that contains methods specific to HTTP Client spans.
The type definitions can be found here.
The implementation of HTTPClientSpan sets the type and the kind properties and will proxy all the dedicated methods to addAttribute.
Additionally I've added a property mandatoryAttributes and extended the end() method to check if all mandatory attributes are set.
This is optional - more of an idea I'd like to discuss. Maybe it's too rigid.
How to integrate in OC
We were first discussing a builder pattern but as we see on the HTTP sensor we don't have access to the Span class but use a factory-like method to create it.
So we would need to add startHTTPClientRootSpan, startHTTPClientChildSpan which seems too intrusive.
Alternatively, I'd propose to extend TraceOptions with a field type and then decide in startRootSpan and startChildSpan which class to create.
Spans represent different canonical types of operations.
Examples are
A span consists of a number of mandatory and optional attributes that add information about the represented operation to it.
Depending on the canonical type of an operation some attributes might be needed to represent and analyze a span correctly.
Right now, spans can be created freely and it’s up to the implementor to set all the attributes needed to represent the given type.
Proposal
I've created a document to help to specify this new feature.
The text was updated successfully, but these errors were encountered: