[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::SpanContext (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-SpanContext)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-SpanContext) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::SpanContext.\n\nThe context of a span. This is attached to an\n[Exemplar](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Api-Distribution-Exemplar \"Google::Api::Distribution::Exemplar (class)\")\nin [Distribution](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Api-Distribution \"Google::Api::Distribution (class)\") values during aggregation.\n\nIt contains the name of a span with format: \n\n projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]\n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #span_name\n\n def span_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The resource name of the span. The format is:\n\n projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]\n\n `[TRACE_ID]` is a unique identifier for a trace within a project;\n it is a 32-character hexadecimal encoding of a 16-byte array.\n\n `[SPAN_ID]` is a unique identifier for a span within a trace; it\n is a 16-character hexadecimal encoding of an 8-byte array.\n\n### #span_name=\n\n def span_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The resource name of the span. The format is:\n\n\n projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]\n\n `[TRACE_ID]` is a unique identifier for a trace within a project;\n it is a 32-character hexadecimal encoding of a 16-byte array.\n\n `[SPAN_ID]` is a unique identifier for a span within a trace; it\nis a 16-character hexadecimal encoding of an 8-byte array. \n**Returns**\n\n- (::String) --- The resource name of the span. The format is:\n\n projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]\n\n `[TRACE_ID]` is a unique identifier for a trace within a project;\n it is a 32-character hexadecimal encoding of a 16-byte array.\n\n `[SPAN_ID]` is a unique identifier for a span within a trace; it\n is a 16-character hexadecimal encoding of an 8-byte array."]]