Skip to content

Commit

Permalink
Improve visibility of used spec version in the semconv repo (open-tel…
Browse files Browse the repository at this point in the history
…emetry#558)

Co-authored-by: Armin Ruech <[email protected]>
  • Loading branch information
2 people authored and pyohannes committed Jan 17, 2024
1 parent b240c82 commit 7a63636
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ key, but non-obvious, aspects:
defined in a schema file. As part of any contribution, you should
include attribute changes defined in the `schema-next.yaml` file.
For details, please read [the schema specification](https://opentelemetry.io/docs/specs/otel/schemas/).
- Links to the specification repository MUST point to a tag and **not** to the `main` branch.
The tag version MUST match with the one defined in [README](README.md).
- After creating a pull request, please update the [CHANGELOG](CHANGELOG.md) file with
a description of your changes.

Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# OpenTelemetry Semantic Conventions
# <img src="https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png" alt="OpenTelemetry Icon" width="45" height=""> OpenTelemetry Semantic Conventions

Welcome to the new repository!
[![Checks](https:/open-telemetry/semantic-conventions/workflows/Checks/badge.svg?branch=main)](https:/open-telemetry/semantic-conventions/actions?query=workflow%3A%22Checks%22+branch%3Amain)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/open-telemetry/semantic-conventions.svg?logo=opentelemetry&&color=f5a800&label=Latest%20release)](https:/open-telemetry/semantic-conventions/releases/latest)
[![Specification Version](https://img.shields.io/badge/OTel_specification_version-v1.26.0-blue?logo=opentelemetry&color=f5a800)](https:/open-telemetry/opentelemetry-specification/releases/tag/v1.26.0)

This is currently a direct copy/filter-branch of the Specification repository
with only semantic conventions included.

This repository is currently using [this specification version][SpecificationVersion].
Semantic Conventions define a common set of (semantic) attributes which
provide meaning to data when collecting, producing and consuming it.

## Read the docs

The documentation currently resides in the [docs](docs/README.md) folder.
The human-readable version of the semantic conventions resides in the [docs](docs/README.md) folder.
Major parts of these Markdown documents are generated from the YAML definitions located in the [model](model/README.md) folder.

## Contributing

Expand All @@ -34,6 +35,4 @@ Maintainers ([@open-telemetry/specs-semconv-maintainers](https:/orgs
- [Josh Suereth](https:/jsuereth), Google
- [Reiley Yang](https:/reyang), Microsoft

_Find more about the maintainer role in [community repository](https:/open-telemetry/community/blob/master/community-membership.md#maintainer)._

[SpecificationVersion]: https:/open-telemetry/opentelemetry-specification/tree/v1.26.0
_Find more about the maintainer role in [community repository](https:/open-telemetry/community/blob/master/community-membership.md#maintainer).
5 changes: 5 additions & 0 deletions internal/tools/update_specification_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ LATEST_SPECIFICATION_VERSION="v1.26.0"
# The specific pattern we look for when replacing URLs
SPECIFICATION_URL_PREFIX="https:/open-telemetry/opentelemetry-specification/tree/"
SPECIFICATION_BLOB_URL_PREFIX="https:/open-telemetry/opentelemetry-specification/blob/"
# The specific pattern we look for updating the Badge with the spec version
SPECIFICATION_BADGE_PREFIX="https://img.shields.io/badge/OTel_specification_version-"
SPECIFICATION_BADGE_RELEASE_TAG_PREFIX="https:/open-telemetry/opentelemetry-specification/releases/tag/"


fix_file() {
echo Fixing file $1
sed -i \
-e "s,${SPECIFICATION_URL_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_URL_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
-e "s,${SPECIFICATION_BLOB_URL_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_URL_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
-e "s,${SPECIFICATION_BADGE_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_BADGE_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
-e "s,${SPECIFICATION_BADGE_RELEASE_TAG_PREFIX}${PREVIOUS_SPECIFICATION_VERSION},${SPECIFICATION_BADGE_RELEASE_TAG_PREFIX}${LATEST_SPECIFICATION_VERSION},g" \
"$1"
}

Expand Down

0 comments on commit 7a63636

Please sign in to comment.