Skip to content

Commit

Permalink
Merge branch 'main' into feature_add_cmake_package_components
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarker authored Jan 8, 2025
2 parents 6d6c2c9 + d19eb32 commit d2d2608
Show file tree
Hide file tree
Showing 199 changed files with 1,339 additions and 416 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ jobs:
run: |
sudo ./ci/setup_grpc.sh
./ci/do_ci.sh cmake.exporter.otprotocol.test
- name: generate test cert
env:
CFSSL_VERSION: 1.6.3
run: |
sudo -E ./tools/setup-cfssl.sh
(cd ./functional/cert; ./generate_cert.sh)
- name: run func test
run: |
(cd ./functional/otlp; ./run_test.sh)
cmake_modern_protobuf_grpc_with_abseil_test:
name: CMake test (with modern protobuf,grpc and abseil)
Expand Down
1 change: 1 addition & 0 deletions .iwyu.imp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{ "include": ["<gtest/gtest-param-test.h>", "private", "<gtest/gtest.h>", "public"] },
{ "include": ["<gtest/gtest_pred_impl.h>", "private", "<gtest/gtest.h>", "public"] },
{ "include": ["<gtest/gtest-typed-test.h>", "private", "<gtest/gtest.h>", "public"] },
{ "include": ["<gtest/gtest-assertion-result.h>", "private", "<gtest/gtest.h>", "public"] },

# We prefer to include <gmock/gmock.h> for simplicity
{ "include": ["<gmock/gmock-function-mocker.h>", "private", "<gmock/gmock.h>", "public"] },
Expand Down
6 changes: 2 additions & 4 deletions api/include/opentelemetry/semconv/http_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ namespace http
* <p>
* histogram
*/
static constexpr const char *kMetricHttpClientRequestDuration =
"metric.http.client.request.duration";
static constexpr const char *kMetricHttpClientRequestDuration = "http.client.request.duration";
static constexpr const char *descrMetricHttpClientRequestDuration =
"Duration of HTTP client requests.";
static constexpr const char *unitMetricHttpClientRequestDuration = "s";
Expand All @@ -52,8 +51,7 @@ CreateSyncDoubleMetricHttpClientRequestDuration(metrics::Meter *meter)
* <p>
* histogram
*/
static constexpr const char *kMetricHttpServerRequestDuration =
"metric.http.server.request.duration";
static constexpr const char *kMetricHttpServerRequestDuration = "http.server.request.duration";
static constexpr const char *descrMetricHttpServerRequestDuration =
"Duration of HTTP server requests.";
static constexpr const char *unitMetricHttpServerRequestDuration = "s";
Expand Down
12 changes: 6 additions & 6 deletions api/include/opentelemetry/semconv/incubating/container_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace container
* <p>
* counter
*/
static constexpr const char *kMetricContainerCpuTime = "metric.container.cpu.time";
static constexpr const char *kMetricContainerCpuTime = "container.cpu.time";
static constexpr const char *descrMetricContainerCpuTime = "Total CPU time consumed";
static constexpr const char *unitMetricContainerCpuTime = "s";

Expand Down Expand Up @@ -66,7 +66,7 @@ CreateAsyncDoubleMetricContainerCpuTime(metrics::Meter *meter)
* <p>
* gauge
*/
static constexpr const char *kMetricContainerCpuUsage = "metric.container.cpu.usage";
static constexpr const char *kMetricContainerCpuUsage = "container.cpu.usage";
static constexpr const char *descrMetricContainerCpuUsage =
"Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs";
static constexpr const char *unitMetricContainerCpuUsage = "{cpu}";
Expand Down Expand Up @@ -109,7 +109,7 @@ CreateAsyncDoubleMetricContainerCpuUsage(metrics::Meter *meter)
* <p>
* counter
*/
static constexpr const char *kMetricContainerDiskIo = "metric.container.disk.io";
static constexpr const char *kMetricContainerDiskIo = "container.disk.io";
static constexpr const char *descrMetricContainerDiskIo = "Disk bytes for the container.";
static constexpr const char *unitMetricContainerDiskIo = "By";

Expand Down Expand Up @@ -148,7 +148,7 @@ CreateAsyncDoubleMetricContainerDiskIo(metrics::Meter *meter)
* <p>
* counter
*/
static constexpr const char *kMetricContainerMemoryUsage = "metric.container.memory.usage";
static constexpr const char *kMetricContainerMemoryUsage = "container.memory.usage";
static constexpr const char *descrMetricContainerMemoryUsage = "Memory usage of the container.";
static constexpr const char *unitMetricContainerMemoryUsage = "By";

Expand Down Expand Up @@ -187,7 +187,7 @@ CreateAsyncDoubleMetricContainerMemoryUsage(metrics::Meter *meter)
* <p>
* counter
*/
static constexpr const char *kMetricContainerNetworkIo = "metric.container.network.io";
static constexpr const char *kMetricContainerNetworkIo = "container.network.io";
static constexpr const char *descrMetricContainerNetworkIo = "Network bytes for the container.";
static constexpr const char *unitMetricContainerNetworkIo = "By";

Expand Down Expand Up @@ -226,7 +226,7 @@ CreateAsyncDoubleMetricContainerNetworkIo(metrics::Meter *meter)
* as a floating point number with the highest precision available. The actual accuracy would depend
* on the instrumentation and operating system. <p> gauge
*/
static constexpr const char *kMetricContainerUptime = "metric.container.uptime";
static constexpr const char *kMetricContainerUptime = "container.uptime";
static constexpr const char *descrMetricContainerUptime = "The time the container has been running";
static constexpr const char *unitMetricContainerUptime = "s";

Expand Down
55 changes: 22 additions & 33 deletions api/include/opentelemetry/semconv/incubating/db_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace db
* The number of connections that are currently in state described by the @code state @endcode
* attribute <p> updowncounter
*/
static constexpr const char *kMetricDbClientConnectionCount = "metric.db.client.connection.count";
static constexpr const char *kMetricDbClientConnectionCount = "db.client.connection.count";
static constexpr const char *descrMetricDbClientConnectionCount =
"The number of connections that are currently in state described by the `state` attribute";
static constexpr const char *unitMetricDbClientConnectionCount = "{connection}";
Expand Down Expand Up @@ -67,7 +67,7 @@ CreateAsyncDoubleMetricDbClientConnectionCount(metrics::Meter *meter)
* histogram
*/
static constexpr const char *kMetricDbClientConnectionCreateTime =
"metric.db.client.connection.create_time";
"db.client.connection.create_time";
static constexpr const char *descrMetricDbClientConnectionCreateTime =
"The time it took to create a new connection";
static constexpr const char *unitMetricDbClientConnectionCreateTime = "s";
Expand All @@ -93,8 +93,7 @@ CreateSyncDoubleMetricDbClientConnectionCreateTime(metrics::Meter *meter)
* <p>
* updowncounter
*/
static constexpr const char *kMetricDbClientConnectionIdleMax =
"metric.db.client.connection.idle.max";
static constexpr const char *kMetricDbClientConnectionIdleMax = "db.client.connection.idle.max";
static constexpr const char *descrMetricDbClientConnectionIdleMax =
"The maximum number of idle open connections allowed";
static constexpr const char *unitMetricDbClientConnectionIdleMax = "{connection}";
Expand Down Expand Up @@ -136,8 +135,7 @@ CreateAsyncDoubleMetricDbClientConnectionIdleMax(metrics::Meter *meter)
* <p>
* updowncounter
*/
static constexpr const char *kMetricDbClientConnectionIdleMin =
"metric.db.client.connection.idle.min";
static constexpr const char *kMetricDbClientConnectionIdleMin = "db.client.connection.idle.min";
static constexpr const char *descrMetricDbClientConnectionIdleMin =
"The minimum number of idle open connections allowed";
static constexpr const char *unitMetricDbClientConnectionIdleMin = "{connection}";
Expand Down Expand Up @@ -179,7 +177,7 @@ CreateAsyncDoubleMetricDbClientConnectionIdleMin(metrics::Meter *meter)
* <p>
* updowncounter
*/
static constexpr const char *kMetricDbClientConnectionMax = "metric.db.client.connection.max";
static constexpr const char *kMetricDbClientConnectionMax = "db.client.connection.max";
static constexpr const char *descrMetricDbClientConnectionMax =
"The maximum number of open connections allowed";
static constexpr const char *unitMetricDbClientConnectionMax = "{connection}";
Expand Down Expand Up @@ -222,7 +220,7 @@ CreateAsyncDoubleMetricDbClientConnectionMax(metrics::Meter *meter)
* updowncounter
*/
static constexpr const char *kMetricDbClientConnectionPendingRequests =
"metric.db.client.connection.pending_requests";
"db.client.connection.pending_requests";
static constexpr const char *descrMetricDbClientConnectionPendingRequests =
"The number of current pending requests for an open connection";
static constexpr const char *unitMetricDbClientConnectionPendingRequests = "{request}";
Expand Down Expand Up @@ -264,8 +262,7 @@ CreateAsyncDoubleMetricDbClientConnectionPendingRequests(metrics::Meter *meter)
* <p>
* counter
*/
static constexpr const char *kMetricDbClientConnectionTimeouts =
"metric.db.client.connection.timeouts";
static constexpr const char *kMetricDbClientConnectionTimeouts = "db.client.connection.timeouts";
static constexpr const char *descrMetricDbClientConnectionTimeouts =
"The number of connection timeouts that have occurred trying to obtain a connection from the "
"pool";
Expand Down Expand Up @@ -308,8 +305,7 @@ CreateAsyncDoubleMetricDbClientConnectionTimeouts(metrics::Meter *meter)
* <p>
* histogram
*/
static constexpr const char *kMetricDbClientConnectionUseTime =
"metric.db.client.connection.use_time";
static constexpr const char *kMetricDbClientConnectionUseTime = "db.client.connection.use_time";
static constexpr const char *descrMetricDbClientConnectionUseTime =
"The time between borrowing a connection and returning it to the pool";
static constexpr const char *unitMetricDbClientConnectionUseTime = "s";
Expand All @@ -335,8 +331,7 @@ CreateSyncDoubleMetricDbClientConnectionUseTime(metrics::Meter *meter)
* <p>
* histogram
*/
static constexpr const char *kMetricDbClientConnectionWaitTime =
"metric.db.client.connection.wait_time";
static constexpr const char *kMetricDbClientConnectionWaitTime = "db.client.connection.wait_time";
static constexpr const char *descrMetricDbClientConnectionWaitTime =
"The time it took to obtain an open connection from the pool";
static constexpr const char *unitMetricDbClientConnectionWaitTime = "s";
Expand Down Expand Up @@ -366,7 +361,7 @@ CreateSyncDoubleMetricDbClientConnectionWaitTime(metrics::Meter *meter)
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsCreateTime =
"metric.db.client.connections.create_time";
"db.client.connections.create_time";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsCreateTime =
"Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from "
Expand Down Expand Up @@ -401,8 +396,7 @@ CreateSyncDoubleMetricDbClientConnectionsCreateTime(metrics::Meter *meter)
* updowncounter
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsIdleMax =
"metric.db.client.connections.idle.max";
static constexpr const char *kMetricDbClientConnectionsIdleMax = "db.client.connections.idle.max";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsIdleMax =
"Deprecated, use `db.client.connection.idle.max` instead.";
Expand Down Expand Up @@ -454,8 +448,7 @@ CreateAsyncDoubleMetricDbClientConnectionsIdleMax(metrics::Meter *meter)
* updowncounter
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsIdleMin =
"metric.db.client.connections.idle.min";
static constexpr const char *kMetricDbClientConnectionsIdleMin = "db.client.connections.idle.min";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsIdleMin =
"Deprecated, use `db.client.connection.idle.min` instead.";
Expand Down Expand Up @@ -507,7 +500,7 @@ CreateAsyncDoubleMetricDbClientConnectionsIdleMin(metrics::Meter *meter)
* updowncounter
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsMax = "metric.db.client.connections.max";
static constexpr const char *kMetricDbClientConnectionsMax = "db.client.connections.max";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsMax =
"Deprecated, use `db.client.connection.max` instead.";
Expand Down Expand Up @@ -560,7 +553,7 @@ CreateAsyncDoubleMetricDbClientConnectionsMax(metrics::Meter *meter)
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsPendingRequests =
"metric.db.client.connections.pending_requests";
"db.client.connections.pending_requests";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsPendingRequests =
"Deprecated, use `db.client.connection.pending_requests` instead.";
Expand Down Expand Up @@ -612,8 +605,7 @@ CreateAsyncDoubleMetricDbClientConnectionsPendingRequests(metrics::Meter *meter)
* counter
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsTimeouts =
"metric.db.client.connections.timeouts";
static constexpr const char *kMetricDbClientConnectionsTimeouts = "db.client.connections.timeouts";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsTimeouts =
"Deprecated, use `db.client.connection.timeouts` instead.";
Expand Down Expand Up @@ -665,7 +657,7 @@ CreateAsyncDoubleMetricDbClientConnectionsTimeouts(metrics::Meter *meter)
* updowncounter
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsUsage = "metric.db.client.connections.usage";
static constexpr const char *kMetricDbClientConnectionsUsage = "db.client.connections.usage";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsUsage =
"Deprecated, use `db.client.connection.count` instead.";
Expand Down Expand Up @@ -716,8 +708,7 @@ CreateAsyncDoubleMetricDbClientConnectionsUsage(metrics::Meter *meter)
* ms @endcode to @code s @endcode. <p> histogram
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsUseTime =
"metric.db.client.connections.use_time";
static constexpr const char *kMetricDbClientConnectionsUseTime = "db.client.connections.use_time";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsUseTime =
"Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from "
Expand Down Expand Up @@ -751,8 +742,7 @@ CreateSyncDoubleMetricDbClientConnectionsUseTime(metrics::Meter *meter)
* ms @endcode to @code s @endcode. <p> histogram
*/
OPENTELEMETRY_DEPRECATED
static constexpr const char *kMetricDbClientConnectionsWaitTime =
"metric.db.client.connections.wait_time";
static constexpr const char *kMetricDbClientConnectionsWaitTime = "db.client.connections.wait_time";
OPENTELEMETRY_DEPRECATED
static constexpr const char *descrMetricDbClientConnectionsWaitTime =
"Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from "
Expand Down Expand Up @@ -784,7 +774,7 @@ CreateSyncDoubleMetricDbClientConnectionsWaitTime(metrics::Meter *meter)
* updowncounter
*/
static constexpr const char *kMetricDbClientCosmosdbActiveInstanceCount =
"metric.db.client.cosmosdb.active_instance.count";
"db.client.cosmosdb.active_instance.count";
static constexpr const char *descrMetricDbClientCosmosdbActiveInstanceCount =
"Number of active client instances";
static constexpr const char *unitMetricDbClientCosmosdbActiveInstanceCount = "{instance}";
Expand Down Expand Up @@ -826,7 +816,7 @@ CreateAsyncDoubleMetricDbClientCosmosdbActiveInstanceCount(metrics::Meter *meter
* by the operation <p> histogram
*/
static constexpr const char *kMetricDbClientCosmosdbOperationRequestCharge =
"metric.db.client.cosmosdb.operation.request_charge";
"db.client.cosmosdb.operation.request_charge";
static constexpr const char *descrMetricDbClientCosmosdbOperationRequestCharge =
"[Request charge](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the "
"operation";
Expand Down Expand Up @@ -855,8 +845,7 @@ CreateSyncDoubleMetricDbClientCosmosdbOperationRequestCharge(metrics::Meter *met
* <p>
* histogram
*/
static constexpr const char *kMetricDbClientOperationDuration =
"metric.db.client.operation.duration";
static constexpr const char *kMetricDbClientOperationDuration = "db.client.operation.duration";
static constexpr const char *descrMetricDbClientOperationDuration =
"Duration of database client operations.";
static constexpr const char *unitMetricDbClientOperationDuration = "s";
Expand All @@ -883,7 +872,7 @@ CreateSyncDoubleMetricDbClientOperationDuration(metrics::Meter *meter)
* histogram
*/
static constexpr const char *kMetricDbClientResponseReturnedRows =
"metric.db.client.response.returned_rows";
"db.client.response.returned_rows";
static constexpr const char *descrMetricDbClientResponseReturnedRows =
"The actual number of records returned by the database operation.";
static constexpr const char *unitMetricDbClientResponseReturnedRows = "{row}";
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/semconv/incubating/dns_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace dns
* <p>
* histogram
*/
static constexpr const char *kMetricDnsLookupDuration = "metric.dns.lookup.duration";
static constexpr const char *kMetricDnsLookupDuration = "dns.lookup.duration";
static constexpr const char *descrMetricDnsLookupDuration =
"Measures the time taken to perform a DNS lookup.";
static constexpr const char *unitMetricDnsLookupDuration = "s";
Expand Down
Loading

0 comments on commit d2d2608

Please sign in to comment.