diff --git a/docs/cpp-metrics-api-design.md b/docs/cpp-metrics-api-design.md index bb460f04c7..08c8a981e6 100644 --- a/docs/cpp-metrics-api-design.md +++ b/docs/cpp-metrics-api-design.md @@ -92,7 +92,7 @@ implementation of the `MeterProvider` into the API **`GetMeter(name, version)` method must be supported** * Expects 2 string arguments: - * name (required): identifies the instrumentation library. + * name (required): identifies the instrumentation scope. * version (optional): specifies the version of the instrumenting library (the library injecting OpenTelemetry calls into the code) diff --git a/docs/cpp-metrics-sdk-design.md b/docs/cpp-metrics-sdk-design.md index 7ae3c16c0f..5ff355046d 100644 --- a/docs/cpp-metrics-sdk-design.md +++ b/docs/cpp-metrics-sdk-design.md @@ -59,7 +59,7 @@ implementation of the `MeterProvider` into the API. **`GetMeter(name, version)` method must be supported** * Expects 2 string arguments: - * name (required): identifies the instrumentation library. + * name (required): identifies the instrumentation scope. * version (optional): specifies the version of the instrumenting library (the library injecting OpenTelemetry calls into the code). @@ -142,7 +142,7 @@ public: * * Arguments: * MeterProvider, the MeterProvider object that spawned this Meter. - * InstrumentationInfo, the name of the instrumentation library and, optionally, + * InstrumentationInfo, the name of the instrumentation scope and, optionally, * the version. * */ diff --git a/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h b/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h index a9ff1b418f..3e604ccf17 100644 --- a/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h +++ b/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h @@ -203,10 +203,10 @@ class ElasticSearchRecordable final : public sdk::logs::Recordable /** * Set instrumentation_scope for this log. - * @param instrumentation_scopehe instrumentation library to set + * @param instrumentation_scope the instrumentation scope to set */ void SetInstrumentationScope(const opentelemetry::sdk::instrumentationscope::InstrumentationScope - &instrumentation_scope) noexcept + &instrumentation_scope) noexcept override { json_["name"] = instrumentation_scope.GetName(); instrumentation_scope_ = &instrumentation_scope; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_log_recordable.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_log_recordable.h index 9c4cc7c808..f8f0cabfdd 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_log_recordable.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_log_recordable.h @@ -93,7 +93,7 @@ class OtlpLogRecordable final : public opentelemetry::sdk::logs::Recordable /** * Set instrumentation_scope for this log. - * @param instrumentation_scopehe instrumentation library to set + * @param instrumentation_scope the instrumentation scope to set */ void SetInstrumentationScope(const opentelemetry::sdk::instrumentationscope::InstrumentationScope &instrumentation_scope) noexcept override; @@ -105,7 +105,7 @@ class OtlpLogRecordable final : public opentelemetry::sdk::logs::Recordable return GetInstrumentationScope(); } - /** Returns the associated instruementation library */ + /** Returns the associated instruementation scope */ const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationScope() const noexcept; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_metric_utils.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_metric_utils.h index 380c96d279..87a972820f 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_metric_utils.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_metric_utils.h @@ -41,7 +41,7 @@ class OtlpMetricUtils static void ConvertGaugeMetric(const opentelemetry::sdk::metrics::MetricData &metric_data, proto::metrics::v1::Gauge *const gauge) noexcept; - static void PopulateInstrumentationInfoMetric( + static void PopulateInstrumentInfoMetrics( const opentelemetry::sdk::metrics::MetricData &metric_data, proto::metrics::v1::Metric *metric) noexcept; diff --git a/exporters/otlp/src/otlp_metric_utils.cc b/exporters/otlp/src/otlp_metric_utils.cc index 77a776ebfb..075df76b89 100644 --- a/exporters/otlp/src/otlp_metric_utils.cc +++ b/exporters/otlp/src/otlp_metric_utils.cc @@ -167,7 +167,7 @@ void OtlpMetricUtils::ConvertGaugeMetric(const opentelemetry::sdk::metrics::Metr } } -void OtlpMetricUtils::PopulateInstrumentationInfoMetric( +void OtlpMetricUtils::PopulateInstrumentInfoMetrics( const opentelemetry::sdk::metrics::MetricData &metric_data, proto::metrics::v1::Metric *metric) noexcept { @@ -214,7 +214,7 @@ void OtlpMetricUtils::PopulateResourceMetrics( for (auto &metric_data : scope_metrics.metric_data_) { - PopulateInstrumentationInfoMetric(metric_data, scope_lib_metrics->add_metrics()); + PopulateInstrumentInfoMetrics(metric_data, scope_lib_metrics->add_metrics()); } } } diff --git a/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h b/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h index 5edabf38a0..c24b4993d2 100644 --- a/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h +++ b/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h @@ -24,8 +24,8 @@ class InstrumentationScope /** * Returns a newly created InstrumentationScope with the specified library name and version. - * @param name name of the instrumentation library. - * @param version version of the instrumentation library. + * @param name name of the instrumentation scope. + * @param version version of the instrumentation scope. * @param schema_url schema url of the telemetry emitted by the library. * @returns the newly created InstrumentationScope. */ @@ -41,7 +41,7 @@ class InstrumentationScope /** * Compare 2 instrumentation libraries. - * @param other the instrumentation library to compare to. + * @param other the instrumentation scope to compare to. * @returns true if the 2 instrumentation libraries are equal, false otherwise. */ bool operator==(const InstrumentationScope &other) const @@ -50,12 +50,12 @@ class InstrumentationScope } /** - * Check whether the instrumentation library has given name and version. + * Check whether the instrumentation scope has given name and version. * This could be used to check version equality and avoid heap allocation. - * @param name name of the instrumentation library to compare. - * @param version version of the instrumentatoin library to compare. - * @param schema_url schema url of the telemetry emitted by the library. - * @returns true if name and version in this instrumentation library are equal with the given name + * @param name name of the instrumentation scope to compare. + * @param version version of the instrumentation scope to compare. + * @param schema_url schema url of the telemetry emitted by the scope. + * @returns true if name and version in this instrumentation scope are equal with the given name * and version. */ bool equal(const nostd::string_view name, diff --git a/sdk/include/opentelemetry/sdk/logs/log_record.h b/sdk/include/opentelemetry/sdk/logs/log_record.h index bed9c3436a..25ab44c334 100644 --- a/sdk/include/opentelemetry/sdk/logs/log_record.h +++ b/sdk/include/opentelemetry/sdk/logs/log_record.h @@ -174,7 +174,7 @@ class LogRecord final : public Recordable /** * Set instrumentation_scope for this log. - * @param instrumentation_scopehe instrumentation library to set + * @param instrumentation_scope the instrumentation scope to set */ void SetInstrumentationScope(const opentelemetry::sdk::instrumentationscope::InstrumentationScope &instrumentation_scope) noexcept diff --git a/sdk/include/opentelemetry/sdk/logs/logger.h b/sdk/include/opentelemetry/sdk/logs/logger.h index 936476b6f5..59177ef644 100644 --- a/sdk/include/opentelemetry/sdk/logs/logger.h +++ b/sdk/include/opentelemetry/sdk/logs/logger.h @@ -58,7 +58,7 @@ class Logger final : public opentelemetry::logs::Logger opentelemetry::trace::TraceFlags trace_flags, opentelemetry::common::SystemTimestamp timestamp) noexcept override; - /** Returns the associated instruementation library */ + /** Returns the associated instrumentation scope */ const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationScope() const noexcept; @@ -73,7 +73,7 @@ class Logger final : public opentelemetry::logs::Logger // The name of this logger std::string logger_name_; - // order of declaration is important here - instrumentation library should destroy after + // order of declaration is important here - instrumentation scope should destroy after // logger-context. std::unique_ptr instrumentation_scope_; std::shared_ptr context_; diff --git a/sdk/include/opentelemetry/sdk/logs/multi_recordable.h b/sdk/include/opentelemetry/sdk/logs/multi_recordable.h index 2db5dcb66b..d2d9e9952c 100644 --- a/sdk/include/opentelemetry/sdk/logs/multi_recordable.h +++ b/sdk/include/opentelemetry/sdk/logs/multi_recordable.h @@ -82,12 +82,12 @@ class MultiRecordable final : public Recordable /** * Set instrumentation_scope for this log. - * @param instrumentation_scopehe instrumentation library to set + * @param instrumentation_scope the instrumentation scope to set */ void SetInstrumentationScope(const opentelemetry::sdk::instrumentationscope::InstrumentationScope &instrumentation_scope) noexcept override; - /** Returns the associated instruementation library */ + /** Returns the associated instrumentation scope */ const opentelemetry::sdk::instrumentationscope::InstrumentationScope &GetInstrumentationScope() const noexcept; diff --git a/sdk/include/opentelemetry/sdk/logs/recordable.h b/sdk/include/opentelemetry/sdk/logs/recordable.h index 83aca186c9..13e834ee49 100644 --- a/sdk/include/opentelemetry/sdk/logs/recordable.h +++ b/sdk/include/opentelemetry/sdk/logs/recordable.h @@ -85,7 +85,7 @@ class Recordable /** * Set instrumentation_scope for this log. - * @param instrumentation_scopehe instrumentation library to set + * @param instrumentation_scope the instrumentation scope to set */ virtual void SetInstrumentationScope( const opentelemetry::sdk::instrumentationscope::InstrumentationScope diff --git a/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h b/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h index 90ffbc4716..7b4cf4d47f 100644 --- a/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h +++ b/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h @@ -15,7 +15,7 @@ namespace metrics /** * Metric Data to be exported along with resources and - * Instrumentation library. + * Instrumentation scope. */ struct ScopeMetrics { diff --git a/sdk/include/opentelemetry/sdk/metrics/meter.h b/sdk/include/opentelemetry/sdk/metrics/meter.h index ecdcad549c..22608e2b05 100644 --- a/sdk/include/opentelemetry/sdk/metrics/meter.h +++ b/sdk/include/opentelemetry/sdk/metrics/meter.h @@ -105,7 +105,7 @@ class Meter final : public opentelemetry::metrics::Meter nostd::string_view unit = "", void *state = nullptr) noexcept override; - /** Returns the associated instruementation library */ + /** Returns the associated instrumentation scope */ const sdk::instrumentationscope::InstrumentationScope *GetInstrumentationScope() const noexcept; OPENTELEMETRY_DEPRECATED_MESSAGE("Please use GetInstrumentationScope instead") @@ -119,7 +119,7 @@ class Meter final : public opentelemetry::metrics::Meter opentelemetry::common::SystemTimestamp collect_ts) noexcept; private: - // order of declaration is important here - instrumentation library should destroy after + // order of declaration is important here - instrumentation scope should destroy after // meter-context. std::unique_ptr scope_; std::shared_ptr meter_context_; diff --git a/sdk/include/opentelemetry/sdk/trace/recordable.h b/sdk/include/opentelemetry/sdk/trace/recordable.h index d83124e06d..8f9fb460e4 100644 --- a/sdk/include/opentelemetry/sdk/trace/recordable.h +++ b/sdk/include/opentelemetry/sdk/trace/recordable.h @@ -141,8 +141,8 @@ class Recordable virtual void SetDuration(std::chrono::nanoseconds duration) noexcept = 0; /** - * Set the instrumentation library of the span. - * @param instrumentation_scope the instrumentation library to set + * Set the instrumentation scope of the span. + * @param instrumentation_scope the instrumentation scope to set */ virtual void SetInstrumentationScope( const InstrumentationScope &instrumentation_scope) noexcept = 0; diff --git a/sdk/include/opentelemetry/sdk/trace/span_data.h b/sdk/include/opentelemetry/sdk/trace/span_data.h index 323af3da98..61a7ced6fe 100644 --- a/sdk/include/opentelemetry/sdk/trace/span_data.h +++ b/sdk/include/opentelemetry/sdk/trace/span_data.h @@ -175,7 +175,7 @@ class SpanData final : public Recordable { if (instrumentation_scope_ == nullptr) { - // this shouldn't happen as Tracer ensures there is valid default instrumentation library. + // this shouldn't happen as Tracer ensures there is valid default instrumentation scope. static std::unique_ptr instrumentation_scope = opentelemetry::sdk::instrumentationscope::InstrumentationScope::Create( diff --git a/sdk/include/opentelemetry/sdk/trace/tracer.h b/sdk/include/opentelemetry/sdk/trace/tracer.h index c13c49fc38..3ac17aad66 100644 --- a/sdk/include/opentelemetry/sdk/trace/tracer.h +++ b/sdk/include/opentelemetry/sdk/trace/tracer.h @@ -48,7 +48,7 @@ class Tracer final : public trace_api::Tracer, public std::enable_shared_from_th /** Returns the configured Id generator */ IdGenerator &GetIdGenerator() const noexcept { return context_->GetIdGenerator(); } - /** Returns the associated instruementation library */ + /** Returns the associated instrumentation scope */ const InstrumentationScope &GetInstrumentationScope() const noexcept { return *instrumentation_scope_; @@ -67,7 +67,7 @@ class Tracer final : public trace_api::Tracer, public std::enable_shared_from_th Sampler &GetSampler() { return context_->GetSampler(); } private: - // order of declaration is important here - instrumentation library should destroy after + // order of declaration is important here - instrumentation scope should destroy after // tracer-context. std::shared_ptr instrumentation_scope_; std::shared_ptr context_;