diff --git a/CHANGELOG.md b/CHANGELOG.md index 879ec025985..7cab9302a09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2947](https://github.com/open-telemetry/opentelemetry-python/pull/2947)) - `exporter-otlp-proto-http`: add user agent string ([#2959](https://github.com/open-telemetry/opentelemetry-python/pull/2959)) +- Add http-metric instrument names to semantic conventions + ([#2976](https://github.com/open-telemetry/opentelemetry-python/pull/2976)) ## [1.13.0-0.34b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.13.0) - 2022-09-26 diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py new file mode 100644 index 00000000000..8ff6720165e --- /dev/null +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py @@ -0,0 +1,32 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# pylint: disable=too-many-lines + + +class MetricInstruments: + + HTTP_SERVER_DURATION = "http.server.duration" + + HTTP_SERVER_REQUEST_SIZE = "http.server.request.size" + + HTTP_SERVER_RESPONSE_SIZE = "http.server.response.size" + + HTTP_SERVER_ACTIVE_REQUESTS = "http.server.active_requests" + + HTTP_CLIENT_DURATION = "http.client.duration" + + HTTP_CLIENT_REQUEST_SIZE = "http.client.request.size" + + HTTP_CLIENT_RESPONSE_SIZE = "http.client.response.size"