public sealed class SpanContext : IMessage<SpanContext>, IEquatable<SpanContext>, IDeepCloneable<SpanContext>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Monitoring v3 API class SpanContext.
The context of a span. This is attached to an
[Exemplar][google.api.Distribution.Exemplar]
in [Distribution][google.api.Distribution] values during aggregation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available for the Google Cloud Monitoring v3 API class SpanContext is 3.15.0, with multiple previous versions available, ranging back to version 2.3.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSpanContext\u003c/code\u003e class represents the context of a span, which is included in \u003ccode\u003eDistribution\u003c/code\u003e values during aggregation and contains the name of a span.\u003c/p\u003e\n"],["\u003cp\u003eThe span name within \u003ccode\u003eSpanContext\u003c/code\u003e follows the format \u003ccode\u003eprojects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]\u003c/code\u003e, and identifies a span in a trace.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSpanContext\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage<SpanContext>\u003c/code\u003e, \u003ccode\u003eIEquatable<SpanContext>\u003c/code\u003e, \u003ccode\u003eIDeepCloneable<SpanContext>\u003c/code\u003e, \u003ccode\u003eIBufferMessage\u003c/code\u003e, and \u003ccode\u003eIMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSpanContext\u003c/code\u003e class has a \u003ccode\u003eSpanName\u003c/code\u003e property, which is of type string, that stores the resource name of the span in a specific format.\u003c/p\u003e\n"]]],[],null,[]]