Skip to content

context_propagation example client returns an error during first run #23

Closed
@duncanpo

Description

@duncanpo

In context_propagation example, the C++ client is first called, it returns an error, which is recorded in a span:

2023-09-29T11:18:16.869-0400 info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "logging", "#spans": 1}
2023-09-29T11:18:16.870-0400 info ResourceSpans #0
Resource SchemaURL:
Resource attributes:
-> telemetry.sdk.language: Str(cpp)
-> telemetry.sdk.name: Str(opentelemetry)
-> telemetry.sdk.version: Str(1.11.0)
-> service.name: Str(unknown_service)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope http-client
Span #0
Trace ID : db7538e16a5d3859ea6fd0a564530b91
Parent ID :
ID : 0fcb009d4166df68
Name : /mymagic/magic
Kind : Client
Start time : 2023-09-29 15:18:11.8554305 +0000 UTC
End time : 2023-09-29 15:18:16.868404 +0000 UTC
Status code : Error
Status message : Response Status :7
Attributes:
-> url.full: Str(http://localhost:9910/mymagic/magic)
-> url.scheme: Str(http)
-> http.request.method: Str(POST)
{"kind": "exporter", "data_type": "traces", "name": "logging"}

This has to do with the client is using a timeout that is too small (5s). The first time the server receives a request, it needs to load the ctf file and perform other initialization work. As a result, it takes longer than 5 seconds.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions