diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index a9253c650b..8a37ff106b 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -60,6 +60,7 @@ Currently, the following namespaces exist: - [Heroku](heroku.md) - [Host](host.md) - [HTTP](http.md) +- [Instrumentation](instrumentation.md) - [iOS](ios.md) - [JVM](jvm.md) - [K8s](k8s.md) diff --git a/docs/attributes-registry/gcp.md b/docs/attributes-registry/gcp.md index 0a8ba6319c..3921f3294e 100644 --- a/docs/attributes-registry/gcp.md +++ b/docs/attributes-registry/gcp.md @@ -6,9 +6,28 @@ # GCP +- [Gcp](#gcp-attributes) +- [Gcp Client](#gcp-client-attributes) - [Gcp Cloud Run](#gcp-cloud-run-attributes) - [Gcp Gce](#gcp-gce-attributes) +## GCP Attributes + +Attributes for Google Cloud + +| Attribute | Type | Description | Examples | Stability | +| --------- | ---- | ----------- | -------- | --------- | + +## GCP Client Attributes + +Attributes for Google Cloud client libraries. + +| Attribute | Type | Description | Examples | Stability | +| -------------------- | ------ | ------------------------------------------------------ | ----------------------------------------------------- | ---------------------------------------------------------------- | +| `gcp.client.service` | string | Identifies official Google Cloud client libraries. [1] | `appengine`; `run`; `firestore`; `alloydb`; `spanner` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'. This attribute should be accompanied by 'instrumentation.source.repo' and/or 'instrumentation.source.target' when the combination of 'gcp.client.service' and 'telemetry.sdk.language' is insufficient to uniquely identify the particular client library. + ## GCP Cloud Run Attributes This document defines attributes for Google Cloud Run. diff --git a/docs/attributes-registry/instrumentation.md b/docs/attributes-registry/instrumentation.md new file mode 100644 index 0000000000..1636cc4343 --- /dev/null +++ b/docs/attributes-registry/instrumentation.md @@ -0,0 +1,18 @@ + + + + + +# Instrumentation + +## Instrumentation Attributes + +Describes properties about the library that is being instrumented or that is responsible for performing the instrumentation. + +| Attribute | Type | Description | Examples | Stability | +| ------------------------------- | ------ | -------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------- | +| `instrumentation.source.repo` | string | The repository associated with the InstrumentationScope. | `github.com/organization/repo`; `gitlab.com/group/repo` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `instrumentation.source.target` | string | The build target associated with the InstrumentationScope. [1] | `//in/bazel/path/to/my/folder:target`; `inGradleYourLib` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Particularly useful if the InstrumentationScope library cannot be triangulated from the name and `instrumenation.source.repo` alone. If multiple build targets produce the same result, choose the narrowest possible target (e.g. for Make: "mylib" rather than "all"; for Bazel: "//path/to/specific:target", not "//path/..."; etc.). diff --git a/model/registry/gcp.yaml b/model/registry/gcp.yaml index f63f1d5dc8..a61f630b28 100644 --- a/model/registry/gcp.yaml +++ b/model/registry/gcp.yaml @@ -9,7 +9,7 @@ groups: brief: > Attributes for Google Cloud client libraries. attributes: - - id: gcp.client.service + - id: service type: string stability: experimental brief: Identifies official Google Cloud client libraries. diff --git a/model/registry/instrumentation.yaml b/model/registry/instrumentation.yaml index d5e507a9e7..23962a1e1b 100644 --- a/model/registry/instrumentation.yaml +++ b/model/registry/instrumentation.yaml @@ -6,12 +6,12 @@ groups: Describes properties about the library that is being instrumented or that is responsible for performing the instrumentation. attributes: - - id: instrumentation.source.repo + - id: source.repo type: string stability: experimental brief: The repository associated with the InstrumentationScope. examples: [github.com/organization/repo, gitlab.com/group/repo] - - id: instrumentation.source.target + - id: source.target type: string stability: experimental brief: The build target associated with the InstrumentationScope.