You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux
OpenTelemetry version: v1.1.0
Build system: CMake
Compiler:
> g++ --version
g++ (GCC) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What is the expected behavior?
The snippet should compile.
What is the actual behavior?
The snippet fails to compile:
> g++ -I$CONDA_PREFIX/include test.cc -o test
In file included from test.cc:1:
test.cc: In function 'int main(int, char**)':
~/miniconda3/envs/astronaut-cpp/include/opentelemetry/sdk/resource/experimental_semantic_conventions.h:24:33: error: 'attr' was not declared in this scope
24 | #define OTEL_CPP_GET_ATTR(name) attr(OTEL_CPP_CONST_HASHCODE(name))
| ^~~~
test.cc:6:16: note: in expansion of macro 'OTEL_CPP_GET_ATTR'
6 | std::cout << OTEL_CPP_GET_ATTR(AttrServiceName) << std::endl;
| ^~~~~~~~~~~~~~~~~
Additional context
The use of the attr helper should be fully qualified here, so it can be used even when not inside an OpenTelemetry namespace or without having to add using opentelemetry::sdk::resource::attr;.
Describe your environment
Platform: Linux
OpenTelemetry version: v1.1.0
Build system: CMake
Compiler:
Steps to reproduce
Compile this snippet:
What is the expected behavior?
The snippet should compile.
What is the actual behavior?
The snippet fails to compile:
Additional context
The use of the
attr
helper should be fully qualified here, so it can be used even when not inside an OpenTelemetry namespace or without having to addusing opentelemetry::sdk::resource::attr;
.opentelemetry-cpp/sdk/include/opentelemetry/sdk/resource/experimental_semantic_conventions.h
Line 24 in 5de793d
The text was updated successfully, but these errors were encountered: