summaryrefslogtreecommitdiffstats
path: root/contrib/libs/opentelemetry-cpp/sdk/src/common/empty_attributes.cc
blob: 89418d11bd4be417c9f6ba06be3bd81b1c7137b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#include <stdint.h>
#include <array>
#include <string>
#include <utility>

#include "opentelemetry/common/key_value_iterable_view.h"
#include "opentelemetry/sdk/common/empty_attributes.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{

const opentelemetry::common::KeyValueIterableView<std::array<std::pair<std::string, int32_t>, 0>> &
GetEmptyAttributes() noexcept
{
  static const std::array<std::pair<std::string, int32_t>, 0> array{};
  static const opentelemetry::common::KeyValueIterableView<
      std::array<std::pair<std::string, int32_t>, 0>>
      kEmptyAttributes(array);

  return kEmptyAttributes;
}

}  // namespace sdk
OPENTELEMETRY_END_NAMESPACE