Skip to content

Commit

Permalink
Remove redundant prefix in the registry, fixing the attribute generat…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
michaelsafyan committed May 24, 2024
1 parent 042da91 commit 0fbdce0
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions docs/attributes-registry/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 18 additions & 0 deletions docs/attributes-registry/instrumentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# 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.).
2 changes: 1 addition & 1 deletion model/registry/gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions model/registry/instrumentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 9 in model/registry/instrumentation.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[indentation] wrong indentation: expected 2 but found 4
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.
Expand Down

0 comments on commit 0fbdce0

Please sign in to comment.