browser_attributes.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. /*
  6. * DO NOT EDIT, this is an Auto-generated file from:
  7. * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
  8. */
  9. #pragma once
  10. #include "opentelemetry/common/macros.h"
  11. #include "opentelemetry/version.h"
  12. OPENTELEMETRY_BEGIN_NAMESPACE
  13. namespace semconv
  14. {
  15. namespace browser
  16. {
  17. /**
  18. Array of brand name and version separated by a space
  19. <p>
  20. This value is intended to be taken from the <a
  21. href="https://wicg.github.io/ua-client-hints/#interface">UA client hints API</a> (@code
  22. navigator.userAgentData.brands @endcode).
  23. */
  24. static constexpr const char *kBrowserBrands = "browser.brands";
  25. /**
  26. Preferred language of the user using the browser
  27. <p>
  28. This value is intended to be taken from the Navigator API @code navigator.language @endcode.
  29. */
  30. static constexpr const char *kBrowserLanguage = "browser.language";
  31. /**
  32. A boolean that is true if the browser is running on a mobile device
  33. <p>
  34. This value is intended to be taken from the <a
  35. href="https://wicg.github.io/ua-client-hints/#interface">UA client hints API</a> (@code
  36. navigator.userAgentData.mobile @endcode). If unavailable, this attribute SHOULD be left unset.
  37. */
  38. static constexpr const char *kBrowserMobile = "browser.mobile";
  39. /**
  40. The platform on which the browser is running
  41. <p>
  42. This value is intended to be taken from the <a
  43. href="https://wicg.github.io/ua-client-hints/#interface">UA client hints API</a> (@code
  44. navigator.userAgentData.platform @endcode). If unavailable, the legacy @code navigator.platform
  45. @endcode API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the
  46. values to be consistent. The list of possible values is defined in the <a
  47. href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform">W3C User-Agent Client Hints
  48. specification</a>. Note that some (but not all) of these values can overlap with values in the <a
  49. href="./os.md">@code os.type @endcode and @code os.name @endcode attributes</a>. However, for
  50. consistency, the values in the @code browser.platform @endcode attribute should capture the exact
  51. value that the user agent provides.
  52. */
  53. static constexpr const char *kBrowserPlatform = "browser.platform";
  54. } // namespace browser
  55. } // namespace semconv
  56. OPENTELEMETRY_END_NAMESPACE