@@ -615,15 +615,24 @@ function are typically expected to serialize and transmit the data to the
615
615
destination.
616
616
617
617
Export() will never be called concurrently for the same exporter instance.
618
- Export() can be called again only after the current call returns.
618
+ Depending on the implementation the result of the export may be returned to the
619
+ Processor not in the return value of the call to Export() but in a language
620
+ specific way for signaling completion of an asynchronous task. This means that
621
+ while an instance of an exporter will never have its Export() called
622
+ concurrently it does not mean that the task of exporting can not be done
623
+ concurrently. How this is done is outside the scope of this specification. Each
624
+ implementation MUST document the concurrency characteristics the SDK requires of
625
+ the exporter.
619
626
620
627
Export() MUST NOT block indefinitely, there MUST be a reasonable upper limit
621
628
after which the call must time out with an error result (` Failure ` ).
622
629
623
- Any retry logic that is required by the exporter is the responsibility
624
- of the exporter. The default SDK SHOULD NOT implement retry logic, as
625
- the required logic is likely to depend heavily on the specific protocol
626
- and backend the spans are being sent to.
630
+ Concurrent requests and retry logic is the responsibility of the exporter. The
631
+ default SDK's Span Processors SHOULD NOT implement retry logic, as the required
632
+ logic is likely to depend heavily on the specific protocol and backend the spans
633
+ are being sent to. For example, the [ OpenTelemetry Protocol (OTLP)
634
+ specification] ( ../protocol/otlp.md )
635
+ defines logic for both sending concurrent requests and retrying requests.
627
636
628
637
** Parameters:**
629
638
@@ -633,16 +642,20 @@ e.g. for spans in Java it will be typically `Collection<SpanData>`.
633
642
634
643
** Returns:** ExportResult:
635
644
636
- ExportResult is one of:
645
+ The return of Export() is implementation specific. In what is idiomatic for the
646
+ language the Exporter must send an ` ExportResult ` to the Processor.
647
+ ` ExportResult ` has values of either ` Success ` or ` Failure ` :
637
648
638
649
* ` Success ` - The batch has been successfully exported.
639
650
For protocol exporters this typically means that the data is sent over
640
651
the wire and delivered to the destination server.
641
652
* ` Failure ` - exporting failed. The batch must be dropped. For example, this
642
653
can happen when the batch contains bad data and cannot be serialized.
643
654
644
- Note: this result may be returned via an async mechanism or a callback, if that
645
- is idiomatic for the language implementation.
655
+ For example, in Java the return of Export() would be a Future which when
656
+ completed returns the ` ExportResult ` object. While in Erlang the Exporter sends
657
+ a message to the Processor with the ` ExportResult ` for a particular batch of
658
+ spans.
646
659
647
660
#### ` Shutdown() `
648
661
0 commit comments