Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics exporter requirements to the metrics SDK spec #1864

Merged
merged 19 commits into from
Aug 25, 2021

Conversation

reyang
Copy link
Member

@reyang reyang commented Aug 12, 2021

Follow up #1837.

Changes

  • Added the metrics exporter type
  • Added more information to the In-memory exporter

@reyang reyang added area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory labels Aug 12, 2021
@reyang reyang marked this pull request as ready for review August 12, 2021 06:47
@reyang reyang requested review from a team August 12, 2021 06:47
specification/metrics/sdk.md Outdated Show resolved Hide resolved
specification/metrics/sdk.md Show resolved Hide resolved
specification/metrics/sdk.md Outdated Show resolved Hide resolved
specification/metrics/sdk.md Outdated Show resolved Hide resolved
specification/metrics/sdk.md Show resolved Hide resolved
specification/metrics/sdk.md Outdated Show resolved Hide resolved
specification/metrics/sdk.md Show resolved Hide resolved
specification/metrics/sdk_exporters/in-memory.md Outdated Show resolved Hide resolved
@jmacd
Copy link
Contributor

jmacd commented Aug 25, 2021

Discussed in the SIG call, and not mentioned in the comments:

The OTel-Go prototype metrics Reader interface, associated with pull exporters and push exporters alike, accepts an ExportKindSelector that allows each exporter to choose the export strategy it desires.

The prototype's basic processor, here, keeps sufficient state during the collect-and-process code path to support both delta and cumulative exporters at once, provided it was given the proper configuration up front.

The "Reader" API (presently named CheckpointSet) accepts the ExportKindSelector here in its ForEach() method for iterating over the results of Collect() in both Push and Pull code paths.

The "configuration up front" is provided via the basic Processor's constructor. Each Exporter is also an ExportKindSelector, meaning the exporter will be consulted once per *metric.Descriptor as to the choice of export strategy. ExportKind is a bit set, allowing multiple exporters to select both export strategies when desired.

// ExportKind indicates the kind of data exported by an exporter.
// These bits may be OR-d together when multiple exporters are in use.
type ExportKind int

const (
	// CumulativeExportKind indicates that an Exporter expects a
	// Cumulative Aggregation.
	CumulativeExportKind ExportKind = 1

	// DeltaExportKind indicates that an Exporter expects a
	// Delta Aggregation.
	DeltaExportKind ExportKind = 2
)

@jmacd
Copy link
Contributor

jmacd commented Aug 25, 2021

Thanks @reyang.

@jmacd jmacd merged commit c5bd549 into open-telemetry:main Aug 25, 2021
@reyang reyang deleted the reyang/metrics-sdk-exporter branch October 4, 2021 17:32
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…etry#1864)

* Add metrics exporter requirements

* rewrap

* address feedback received during SIG meeting

* scope down to push exporter only

* Update specification/metrics/sdk.md

Co-authored-by: Cijo Thomas <[email protected]>

* Update specification/metrics/sdk.md

Co-authored-by: Cijo Thomas <[email protected]>

* fix wording

* adjust wording

* adjust wording

* Update specification/metrics/sdk.md

Co-authored-by: Cijo Thomas <[email protected]>

* Update specification/metrics/sdk.md

Co-authored-by: Cijo Thomas <[email protected]>

* Update specification/metrics/sdk.md

Co-authored-by: John Watson <[email protected]>

* Update specification/metrics/sdk.md

Co-authored-by: John Watson <[email protected]>

* keep in-memory exporter untouched for now

Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: John Watson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants