@@ -224,7 +224,7 @@ class OrderedAttributeMap : public std::map<std::string, OwnedAttributeValue>
224
224
struct MixedAttributeMapStorage
225
225
{
226
226
std::unordered_map<std::string, opentelemetry::common::AttributeValue> attributes;
227
- AttributeMap owened_attributes ;
227
+ AttributeMap owned_attributes ;
228
228
std::unordered_map<std::string, OwnedAttributeView> owened_attributes_view;
229
229
};
230
230
@@ -242,64 +242,64 @@ class MixedAttributeViewSetter
242
242
243
243
void operator ()(bool v)
244
244
{
245
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
246
- storage_->attributes [std::string (*key_)] = v;
245
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
246
+ storage_->attributes [std::string (*key_)] = v;
247
247
}
248
248
249
249
void operator ()(int32_t v)
250
250
{
251
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
252
- storage_->attributes [std::string (*key_)] = v;
251
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
252
+ storage_->attributes [std::string (*key_)] = v;
253
253
}
254
254
255
255
void operator ()(uint32_t v)
256
256
{
257
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
258
- storage_->attributes [std::string (*key_)] = v;
257
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
258
+ storage_->attributes [std::string (*key_)] = v;
259
259
}
260
260
261
261
void operator ()(int64_t v)
262
262
{
263
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
264
- storage_->attributes [std::string (*key_)] = v;
263
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
264
+ storage_->attributes [std::string (*key_)] = v;
265
265
}
266
266
267
267
void operator ()(uint64_t v)
268
268
{
269
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
270
- storage_->attributes [std::string (*key_)] = v;
269
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
270
+ storage_->attributes [std::string (*key_)] = v;
271
271
}
272
272
273
273
void operator ()(double v)
274
274
{
275
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
276
- storage_->attributes [std::string (*key_)] = v;
275
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
276
+ storage_->attributes [std::string (*key_)] = v;
277
277
}
278
278
279
279
void operator ()(nostd::string_view v)
280
280
{
281
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
281
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
282
282
owned_value = (*converter_)(v);
283
283
storage_->attributes [std::string (*key_)] = nostd::get<std::string>(owned_value);
284
284
}
285
285
286
286
void operator ()(const char *v)
287
287
{
288
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
288
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
289
289
owned_value = (*converter_)(v);
290
290
storage_->attributes [std::string (*key_)] = nostd::get<std::string>(owned_value).c_str ();
291
291
}
292
292
293
293
void operator ()(nostd::span<const uint8_t > v)
294
294
{
295
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
295
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
296
296
owned_value = (*converter_)(v);
297
297
storage_->attributes [std::string (*key_)] = nostd::get<std::vector<uint8_t >>(owned_value);
298
298
}
299
299
300
300
void operator ()(nostd::span<const bool > v)
301
301
{
302
- storage_->owened_attributes [std::string (*key_)] = (*converter_)(v);
302
+ storage_->owned_attributes [std::string (*key_)] = (*converter_)(v);
303
303
if (v.empty ())
304
304
{
305
305
storage_->attributes [std::string (*key_)] = nostd::span<const bool >{};
@@ -320,42 +320,42 @@ class MixedAttributeViewSetter
320
320
321
321
void operator ()(nostd::span<const int32_t > v)
322
322
{
323
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
323
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
324
324
owned_value = (*converter_)(v);
325
325
storage_->attributes [std::string (*key_)] = nostd::get<std::vector<int32_t >>(owned_value);
326
326
}
327
327
328
328
void operator ()(nostd::span<const uint32_t > v)
329
329
{
330
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
330
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
331
331
owned_value = (*converter_)(v);
332
332
storage_->attributes [std::string (*key_)] = nostd::get<std::vector<uint32_t >>(owned_value);
333
333
}
334
334
335
335
void operator ()(nostd::span<const int64_t > v)
336
336
{
337
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
337
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
338
338
owned_value = (*converter_)(v);
339
339
storage_->attributes [std::string (*key_)] = nostd::get<std::vector<int64_t >>(owned_value);
340
340
}
341
341
342
342
void operator ()(nostd::span<const uint64_t > v)
343
343
{
344
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
344
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
345
345
owned_value = (*converter_)(v);
346
346
storage_->attributes [std::string (*key_)] = nostd::get<std::vector<uint64_t >>(owned_value);
347
347
}
348
348
349
349
void operator ()(nostd::span<const double > v)
350
350
{
351
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
351
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
352
352
owned_value = (*converter_)(v);
353
353
storage_->attributes [std::string (*key_)] = nostd::get<std::vector<double >>(owned_value);
354
354
}
355
355
356
356
void operator ()(nostd::span<const nostd::string_view> v)
357
357
{
358
- auto &owned_value = storage_->owened_attributes [std::string (*key_)];
358
+ auto &owned_value = storage_->owned_attributes [std::string (*key_)];
359
359
owned_value = (*converter_)(v);
360
360
361
361
if (v.empty ())
@@ -436,7 +436,7 @@ class MixedAttributeMap
436
436
return storage_.attributes ;
437
437
}
438
438
439
- const AttributeMap &GetOwnedAttributes () const noexcept { return storage_.owened_attributes ; }
439
+ const AttributeMap &GetOwnedAttributes () const noexcept { return storage_.owned_attributes ; }
440
440
441
441
// Convert non-owning key-value to owning std::string(key) and OwnedAttributeValue(value)
442
442
void SetAttribute (nostd::string_view key,
@@ -448,7 +448,7 @@ class MixedAttributeMap
448
448
void Reserve (AttributeMap::size_type size)
449
449
{
450
450
storage_.attributes .reserve (size);
451
- storage_.owened_attributes .reserve (size);
451
+ storage_.owned_attributes .reserve (size);
452
452
}
453
453
454
454
AttributeMap::size_type Size () const noexcept { return storage_.attributes .size (); }
0 commit comments