Skip to content

Commit bdf39cb

Browse files
authored
Move specifications into sub-directories per signal (open-telemetry#546)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
1 parent 0ea77a9 commit bdf39cb

29 files changed

+84
-84
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ The OpenTelemetry specification describes the cross-language requirements and ex
1414
- [Package/Library Layout](specification/library-layout.md)
1515
- [Concurrency and Thread-Safety](specification/concurrency.md)
1616
- API Specification
17-
- [CorrelationContext](specification/api-correlationcontext.md)
18-
- [Propagators](specification/api-propagators.md)
19-
- [Tracing](specification/api-tracing.md)
20-
- [Metrics](specification/api-metrics.md)
21-
- [User-Facing API](specification/api-metrics-user.md)
22-
- [Meter API](specification/api-metrics-meter.md)
17+
- [CorrelationContext](specification/correlationcontext/api.md)
18+
- [Propagators](specification/context/api-propagators.md)
19+
- [Tracing](specification/trace/api.md)
20+
- [Metrics](specification/metrics/api.md)
21+
- [User-Facing API](specification/metrics/api-user.md)
22+
- [Meter API](specification/metrics/api-meter.md)
2323
- SDK Specification
24-
- [Tracing](specification/sdk-tracing.md)
25-
- [Resource](specification/sdk-resource.md)
24+
- [Tracing](specification/trace/sdk.md)
25+
- [Resource](specification/resource/sdk.md)
2626
- [Configuration](specification/sdk-configuration.md)
2727
- Data Specification
28-
- [Semantic Conventions](specification/data-semantic-conventions.md)
29-
- [Protocol](specification/protocol.md)
28+
- [Semantic Conventions](specification/overview.md#semantic-conventions.md)
29+
- [Protocol](specification/protocol/README.md)
3030
- About the Project
3131
- [Timeline](#project-timeline)
3232
- [Notation Conventions and Compliance](#notation-conventions-and-compliance)
File renamed without changes.
File renamed without changes.
File renamed without changes.

milestones.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Parity can be defined as the following features:
2727
- An SDK implementing OpenTelemetry specification.
2828
- Backwards compatibility with OpenTracing and OpenCensus via bridges.
2929
- Metadata helpers or other means for recording common operations defined in the
30-
OpenTelemetry [semantic conventions](specification/data-semantic-conventions.md).
30+
OpenTelemetry [semantic conventions](specification/overview.md#semantic-conventions.md).
3131
- Tests which provide evidence of interoperability.
3232
- Benchmarks which provide evidence of expected resource utilization.
3333
- Documentation and getting started guide.
File renamed without changes.
File renamed without changes.

specification/glossary.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ specification.
88
Denotes the library that implements the *OpenTelemetry API*.
99

1010
See [Library Guidelines](library-guidelines.md#sdk-implementation) and
11-
[Library resource semantic conventions](data-resource-semantic-conventions.md#telemetry-sdk)
11+
[Library resource semantic conventions](resource/semantic_conventions/README.md#telemetry-sdk)
1212

1313
<a name="instrumented_library"></a>
1414

@@ -38,11 +38,11 @@ Synonyms: *Instrumentation Library*, *Integration*.
3838
## Tracer Name / Meter Name
3939

4040
This refers to the `name` and (optional) `version` arguments specified when
41-
creating a new `Tracer` or `Meter` (see [Obtaining a Tracer](api-tracing.md#obtaining-a-tracer)/[Obtaining a Meter](api-metrics-user.md#obtaining-a-meter)). It identifies the [Instrumenting Library](#instrumenting_library).
41+
creating a new `Tracer` or `Meter` (see [Obtaining a Tracer](trace/api.md#obtaining-a-tracer)/[Obtaining a Meter](metrics/api-user.md#obtaining-a-meter)). It identifies the [Instrumenting Library](#instrumenting_library).
4242

4343
## Namespace
4444

45-
This term applies to [Metric names](api-metrics-user.md#metric-names) only. The namespace is used to disambiguate identical metric
45+
This term applies to [Metric names](metrics/api-user.md#metric-names) only. The namespace is used to disambiguate identical metric
4646
names used in different [instrumenting libraries](#instrumenting_library). The [Name](#name) provided
4747
for creating a `Meter` serves as its namespace in addition to the primary semantics
4848
described [here](#name).

specification/library-guidelines.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ _Note to Language Library Authors:_ OpenTelemetry specification, API and SDK imp
3535

3636
Here is a generic design for a language library (arrows indicate calls):
3737

38-
![Language Library Design Diagram](img/library-design.png)
38+
![Language Library Design Diagram](../internal/img/library-design.png)
3939

4040
### Expected Usage
4141

@@ -55,7 +55,7 @@ This self-sufficiency is achieved the following way.
5555

5656
The API dependency contains a minimal implementation of the API. When no other implementation is explicitly included in the application no telemetry data will be collected. Here is what active components look like in this case:
5757

58-
![Minimal Operation Diagram](img/library-minimal.png)
58+
![Minimal Operation Diagram](../internal/img/library-minimal.png)
5959

6060
It is important that values returned from this minimal implementation of API are valid and do not require the caller to perform extra checks (e.g. createSpan() method should not fail and should return a valid non-null Span object). The caller should not need to know and worry about the fact that minimal implementation is in effect. This minimizes the boilerplate and error handling in the instrumented code.
6161

@@ -67,17 +67,17 @@ SDK implementation is a separate (optional) dependency. When it is plugged in it
6767

6868
SDK implements core functionality that is required for translating API calls into telemetry data that is ready for exporting. Here is how OpenTelemetry components look like when SDK is enabled:
6969

70-
![Full Operation Diagram](img/library-full.png)
70+
![Full Operation Diagram](../internal/img/library-full.png)
7171

72-
SDK defines an [Exporter interface](sdk-tracing.md#span-exporter). Protocol-specific exporters that are responsible for sending telemetry data to backends must implement this interface.
72+
SDK defines an [Exporter interface](trace/sdk.md#span-exporter). Protocol-specific exporters that are responsible for sending telemetry data to backends must implement this interface.
7373

7474
SDK also includes optional helper exporters that can be composed for additional functionality if needed.
7575

76-
Library designers need to define the language-specific `Exporter` interface based on [this generic specification](sdk-tracing.md#span-exporter).
76+
Library designers need to define the language-specific `Exporter` interface based on [this generic specification](trace/sdk.md#span-exporter).
7777

7878
#### Protocol Exporters
7979

80-
Telemetry backend vendors are expected to implement [Exporter interface](sdk-tracing.md#span-exporter). Data received via Export() function should be serialized and sent to the backend in a vendor-specific way.
80+
Telemetry backend vendors are expected to implement [Exporter interface](trace/sdk.md#span-exporter). Data received via Export() function should be serialized and sent to the backend in a vendor-specific way.
8181

8282
Vendors are encouraged to keep protocol-specific exporters as simple as possible and achieve desirable additional functionality such as queuing and retrying using helpers provided by SDK.
8383

specification/library-layout.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ api
2929

3030
This directory describes the API that provides in-process context propagation.
3131

32-
### [/metrics](api-metrics.md)
32+
### [/metrics](./metrics/api.md)
3333

3434
This directory describes the Metrics API that can be used to record application metrics.
3535

36-
### [/correlationcontext](api-correlationcontext.md)
36+
### [/correlationcontext](correlationcontext/api.md)
3737

3838
This directory describes the CorrelationContext API that can be used to manage context propagation
3939
and metrics-related labeling.
4040

41-
### [/trace](api-tracing.md)
41+
### [/trace](trace/api.md)
4242

4343
This API consist of a few main classes:
4444

45-
- `Tracer` is used for all operations. See [Tracer](api-tracing.md#tracer) section.
45+
- `Tracer` is used for all operations. See [Tracer](trace/api.md#tracer) section.
4646
- `Span` is a mutable object storing information about the current operation
47-
execution. See [Span](api-tracing.md#span) section.
47+
execution. See [Span](trace/api.md#span) section.
4848

4949
### `/internal` (_Optional_)
5050

@@ -81,7 +81,7 @@ This directory describes the SDK implementation for api/context.
8181

8282
This directory describes the SDK implementation for api/metrics.
8383

84-
### [/sdk/resource](sdk-resource.md)
84+
### [/sdk/resource](resource/sdk.md)
8585

8686
The resource directory primarily defines a type [Resource](overview.md#resources) that captures
8787
information about the entity for which stats or traces are recorded. For example, metrics exposed
@@ -90,7 +90,7 @@ and container name.
9090

9191
### `/sdk/correlationcontext`
9292

93-
### [/sdk/trace](sdk-tracing.md)
93+
### [/sdk/trace](trace/sdk.md)
9494

9595
This directory describes the SDK implementation for api/trace.
9696

specification/api-metrics-meter.md specification/metrics/api-meter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
This document will be updated as part of the v0.4 milestone with a
77
detailed list of `Meter` API functions. These functions are given a
8-
high-level description in the [overview document](api-metrics.md) and
8+
high-level description in the [overview document](api.md) and
99
this document will simply give details on the `Meter` API.

specification/api-metrics-user.md specification/metrics/api-user.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
Note: This specification for the v0.3 OpenTelemetry milestone does not
3030
include specification related to the Observer instrument, as described
31-
in the [overview](api-metrics.md). Observer instruments were detailed
31+
in the [overview](api.md). Observer instruments were detailed
3232
in [OTEP
3333
72-metric-observer](https://github.com/open-telemetry/oteps/blob/master/text/0072-metric-observer.md)
3434
and will be added to this document following the v0.3 milestone.
@@ -412,7 +412,7 @@ unordered labels (i.e., a list of bound keys and values) to the
412412

413413
## Detailed specification
414414

415-
See the [SDK-facing Metrics API](api-metrics-meter.md) specification
415+
See the [SDK-facing Metrics API](api-meter.md) specification
416416
for an in-depth summary of each method in the Metrics API.
417417

418418
### Instrument construction
@@ -462,7 +462,7 @@ that it used, and the metric name is the only required field.
462462
| Monotonic | WithMonotonic(boolean) | Configure a counter or gauge that accepts only monotonic/non-monotonic updates. |
463463
| Absolute | WithAbsolute(boolean) | Configure a measure that does or does not accept negative updates. |
464464

465-
See the Metric API [specification overview](api-metrics.md) for more
465+
See the Metric API [specification overview](api.md) for more
466466
information about the kind-specific monotonic and absolute options.
467467

468468
### Bound instrument API

specification/api-metrics.md specification/metrics/api.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Metrics API.
4646

4747
The API provides functions for capturing raw measurements, through
4848
several [calling
49-
conventions](api-metrics-user.md#metric-calling-conventions) that
49+
conventions](api-user.md#metric-calling-conventions) that
5050
offer different levels of performance. Regardless of calling
5151
convention, we define a _metric event_ as the logical thing that
5252
happens when a new measurement is captured. This moment of capture
@@ -69,7 +69,7 @@ and converting into various [exposition formats](#exposition-formats).
6969
However, we find that there are many other uses for metric events,
7070
such as to record aggregated or raw measurements in tracing and
7171
logging systems. For this reason, [OpenTelemetry requires a
72-
separation of the API from the SDK](library-guidelines.md#requirements),
72+
separation of the API from the SDK](../library-guidelines.md#requirements),
7373
so that different SDKs can be configured at run time.
7474

7575
### Metric Instruments
@@ -97,13 +97,13 @@ measurement, and several settings that convey additional meaning
9797
events that it produces.
9898

9999
Details about calling conventions for each kind of instrument are
100-
covered in the [user-level API specification](api-metrics-user.md).
100+
covered in the [user-level API specification](api-user.md).
101101

102102
### Label sets
103103

104104
_Label_ is the term used to refer to a key-value attribute associated
105105
with a metric event. Although they are fundamentally similar to [Span
106-
attributes](api-tracing.md#span) in the tracing API, a label set is
106+
attributes](../trace/api.md#span) in the tracing API, a label set is
107107
given its own type in the Metrics API (generally: `LabelSet`). Label
108108
sets are a feature of the API meant to facilitate re-use and thereby
109109
to lower the cost of processing metric events. Users are encouraged
@@ -112,7 +112,7 @@ previously encoded representation of the labels.
112112

113113
Users obtain label sets by calling a `Meter` API function. Each of
114114
the instrument calling conventions detailed in the [user-level API
115-
specification](api-metrics-user.md) accepts a label set.
115+
specification](api-user.md) accepts a label set.
116116

117117
### Meter Interface
118118

@@ -138,7 +138,7 @@ sampling policies. (TODO: refer to the semantic convention on the
138138
reporting library name).
139139

140140
Details about installing an SDK and obtaining a named `Meter` are
141-
covered in the [SDK-level API specification](api-metrics-meter.md).
141+
covered in the [SDK-level API specification](api-meter.md).
142142

143143
### Aggregations
144144

@@ -245,7 +245,7 @@ Metric events have the same logical representation, regardless of
245245
kind. Whether a Counter, a Measure, or an Observer instrument, metric
246246
events produced through an instrument consist of:
247247

248-
- [Context](context.md) (Span context, Correlation context)
248+
- [Context](../context/context.md) (Span context, Correlation context)
249249
- timestamp (implicit to the SDK)
250250
- instrument definition (name, kind, and semantic options)
251251
- label set (associated key-values)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Metrics Semantic Conventions
2+
3+
TODO: Add semantic conventions for metric names and labels.

specification/overview.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@ validation and sanitization of the Metrics data. Instead, pass the data to the
189189
backend, rely on the backend to perform validation, and pass back any errors
190190
from the backend.
191191

192-
OpenTelemetry defines the naming convention for metric names as well as a
193-
well-known metric names in [Semantic Conventions](data-semantic-conventions.md)
194-
document.
195-
196192
## CorrelationContext
197193

198194
In addition to trace propagation, OpenTelemetry provides a simple mechanism for propagating
@@ -238,7 +234,7 @@ All of OpenTelemetry cross-cutting concerns, such as traces and metrics,
238234
share an underlying `Context` mechanism for storing state and
239235
accessing data across the lifespan of a distributed transaction.
240236

241-
See the [Context](context.md)
237+
See the [Context](context/context.md)
242238

243239
## Propagators
244240

@@ -286,3 +282,17 @@ Adapter" or simply "Adapter".
286282
## Code injecting adapters
287283

288284
TODO: fill out as a result of SIG discussion.
285+
286+
## Semantic Conventions
287+
288+
OpenTelemetry defines standard names and values of Resource attributes and
289+
Span attributes.
290+
291+
* [Resource Conventions](resource/semantic_conventions/README.md)
292+
* [Span Conventions](trace/semantic_conventions/README.md)
293+
* [Metrics Conventions](metrics/semantic_conventions/README.md)
294+
295+
The type of the attribute SHOULD be specified in the semantic convention
296+
for that attribute. Array values are allowed for attributes. For
297+
protocols that do not natively support array values such values MUST be
298+
represented as JSON strings.

specification/protocol.md specification/protocol/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
This is the specification of new OpenTelemetry protocol. This is work in progress.
44

5-
- [Design Goals](proto-design-goals.md).
6-
- [Requirements](proto-requirements.md).
5+
- [Design Goals](design-goals.md).
6+
- [Requirements](requirements.md).
77
- Specification (TBD).
File renamed without changes.

specification/proto-requirements.md specification/protocol/requirements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This document will drive OpenTelemetry Protocol design and RFC.
44

55
## Goals
66

7-
See the goals of OpenTelemetry Protocol design [here](proto-design-goals.md).
7+
See the goals of OpenTelemetry Protocol design [here](design-goals.md).
88

99
## Vocabulary
1010

specification/sdk-resource.md specification/resource/sdk.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Resource SDK
22

3-
A [Resource](overview.md#resources) is an immutable representation of the entity producing
3+
A [Resource](../overview.md#resources) is an immutable representation of the entity producing
44
telemetry. For example, a process producing telemetry that is running in a
55
container on Kubernetes has a Pod name, it is in a namespace and possibly is
66
part of a Deployment which also has a name. All three of these attributes can be
@@ -13,14 +13,14 @@ with closed source environments. The SDK MUST allow for creation of `Resources`
1313
for associating them with telemetry.
1414

1515
When used with distributed tracing, a resource can be associated with the
16-
[TracerProvider](sdk-tracing.md#tracer-sdk) when it is created.
16+
[TracerProvider](../trace/sdk.md#tracer-sdk) when it is created.
1717
That association cannot be changed later.
1818
When associated with a `TracerProvider`,
1919
all `Span`s produced by any `Tracer` from the provider MUST be associated with this `Resource`.
2020

2121
Analogous to distributed tracing, when used with metrics,
2222
a resource can be associated with a `MeterProvider`.
23-
When associated with a [`MeterProvider`](api-metrics-user.md#obtaining-a-meter),
23+
When associated with a [`MeterProvider`](../metrics/api-user.md#obtaining-a-meter),
2424
all `Metrics` produced by any `Meter` from the provider will be
2525
associated with this `Resource`.
2626

@@ -69,7 +69,7 @@ It is recommended, but not required, to provide a way to quickly create an empty
6969
resource.
7070

7171
Note that the OpenTelemetry project documents certain ["standard
72-
attributes"](data-semantic-conventions.md) that have prescribed semantic meanings.
72+
attributes"](semantic_conventions/README.md) that have prescribed semantic meanings.
7373

7474
## Resource operations
7575

specification/data-resource-semantic-conventions.md specification/resource/semantic_conventions/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Resource Conventions
1+
# Resource Semantic Conventions
22

3-
This document defines standard attributes for resources. These attributes are typically used in the [Resource](sdk-resource.md) and are also recommended to be used anywhere else where there is a need to describe a resource in a consistent manner. The majority of these attributes are inherited from
3+
This document defines standard attributes for resources. These attributes are typically used in the [Resource](../sdk.md) and are also recommended to be used anywhere else where there is a need to describe a resource in a consistent manner. The majority of these attributes are inherited from
44
[OpenCensus Resource standard](https://github.com/census-instrumentation/opencensus-specs/blob/master/resource/StandardResources.md).
55

66
* [Service](#service)

specification/api-tracing.md specification/trace/api.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ The API MUST accept the following parameters:
260260
- `Attribute`s - A collection of key-value pairs, with the same semantics as
261261
the ones settable with [Span::SetAttributes](#set-attributes). Additionally,
262262
these attributes may be used to make a sampling decision as noted in [sampling
263-
description](sdk-tracing.md#sampling). An empty collection will be assumed if
263+
description](sdk.md#sampling). An empty collection will be assumed if
264264
not specified.
265265

266266
Whenever possible, users SHOULD set any already known attributes at span creation
@@ -305,7 +305,7 @@ The parent should be selected in the following order of precedence:
305305

306306
During the `Span` creation user MUST have the ability to record links to other `Span`s. Linked
307307
`Span`s can be from the same or a different trace. See [Links
308-
description](overview.md#links-between-spans).
308+
description](../overview.md#links-between-spans).
309309

310310
A `Link` is defined by the following properties:
311311

@@ -361,7 +361,7 @@ allows to record and process information about the individual Span without
361361
sending it to the backend. An example of this scenario may be recording and
362362
processing of all incoming requests for the processing and building of
363363
SLA/SLO latency charts while sending only a subset - sampled spans - to the
364-
backend. See also the [sampling section of SDK design](sdk-tracing.md#sampling).
364+
backend. See also the [sampling section of SDK design](sdk.md#sampling).
365365

366366
Users of the API should only access the `IsRecording` property when
367367
instrumenting code and never access `SampledFlag` unless used in context
@@ -405,7 +405,7 @@ both containing an array of strings to represent a mapping
405405
`header_keys[i] -> header_values[i]`).
406406

407407
Note that the OpenTelemetry project documents certain ["standard
408-
attributes"](data-semantic-conventions.md) that have prescribed semantic meanings.
408+
attributes"](semantic_conventions/README.md) that have prescribed semantic meanings.
409409

410410
#### Add Events
411411

@@ -437,7 +437,7 @@ Events SHOULD preserve the order in which they're set. This will typically match
437437
the ordering of the events' timestamps.
438438

439439
Note that the OpenTelemetry project documents certain ["standard event names and
440-
keys"](data-semantic-conventions.md) which have prescribed semantic meanings.
440+
keys"](semantic_conventions/README.md) which have prescribed semantic meanings.
441441

442442
#### Set Status
443443

0 commit comments

Comments
 (0)