File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -180,33 +180,6 @@ The `rebuild_otlp_format` transform is critical for ensuring traces conform to t
180180
181181# # Testing
182182
183- # ## Send Test Trace
184-
185- Test the OTLP endpoint with OpenTelemetry SDK :
186-
187- ` ` ` python
188- from opentelemetry import trace
189- from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
190- from opentelemetry.sdk.trace import TracerProvider
191- from opentelemetry.sdk.trace.export import BatchSpanProcessor
192-
193- # Configure OTLP exporter to Vector
194- exporter = OTLPSpanExporter(
195- endpoint="http://vector-svc.vector.svc.cluster.local:4318/v1/traces"
196- )
197-
198- # Set up tracing
199- provider = TracerProvider()
200- processor = BatchSpanProcessor(exporter)
201- provider.add_span_processor(processor)
202- trace.set_tracer_provider(provider)
203-
204- # Create a test trace
205- tracer = trace.get_tracer(__name__)
206- with tracer.start_as_current_span("test-span"):
207- print("Test trace sent to Vector")
208- ` ` `
209-
210183# ## Verify Vector is Running
211184
212185` ` ` bash
You can’t perform that action at this time.
0 commit comments