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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016
|
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
/*
* DO NOT EDIT, this is an Auto-generated file from:
* buildscripts/semantic-convention/templates/registry/semantic_metrics-h.j2
*/
#pragma once
#include "opentelemetry/common/macros.h"
#include "opentelemetry/metrics/meter.h"
#include "opentelemetry/version.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace semconv
{
namespace otel
{
/**
The number of log records for which the export has finished, either successful or failed.
<p>
For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code
error.type @endcode MUST contain the failure cause. For exporters with partial success semantics
(e.g. OTLP with @code rejected_log_records @endcode), rejected log records MUST count as failed
and only non-rejected log records count as success. If no rejection reason is available, @code
rejected @endcode SHOULD be used as value for @code error.type @endcode. <p> counter
*/
static constexpr const char *kMetricOtelSdkExporterLogExported = "otel.sdk.exporter.log.exported";
static constexpr const char *descrMetricOtelSdkExporterLogExported =
"The number of log records for which the export has finished, either successful or failed.";
static constexpr const char *unitMetricOtelSdkExporterLogExported = "{log_record}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkExporterLogExported(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkExporterLogExported,
descrMetricOtelSdkExporterLogExported,
unitMetricOtelSdkExporterLogExported);
}
static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkExporterLogExported(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkExporterLogExported,
descrMetricOtelSdkExporterLogExported,
unitMetricOtelSdkExporterLogExported);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterLogExported(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkExporterLogExported,
descrMetricOtelSdkExporterLogExported,
unitMetricOtelSdkExporterLogExported);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterLogExported(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkExporterLogExported,
descrMetricOtelSdkExporterLogExported,
unitMetricOtelSdkExporterLogExported);
}
/**
The number of log records which were passed to the exporter, but that have not been exported yet
(neither successful, nor failed). <p> For successful exports, @code error.type @endcode MUST NOT
be set. For failed exports, @code error.type @endcode MUST contain the failure cause. <p>
updowncounter
*/
static constexpr const char *kMetricOtelSdkExporterLogInflight = "otel.sdk.exporter.log.inflight";
static constexpr const char *descrMetricOtelSdkExporterLogInflight =
"The number of log records which were passed to the exporter, but that have not been exported "
"yet (neither successful, nor failed).";
static constexpr const char *unitMetricOtelSdkExporterLogInflight = "{log_record}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkExporterLogInflight(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkExporterLogInflight,
descrMetricOtelSdkExporterLogInflight,
unitMetricOtelSdkExporterLogInflight);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkExporterLogInflight(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkExporterLogInflight,
descrMetricOtelSdkExporterLogInflight,
unitMetricOtelSdkExporterLogInflight);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterLogInflight(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkExporterLogInflight,
descrMetricOtelSdkExporterLogInflight,
unitMetricOtelSdkExporterLogInflight);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterLogInflight(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkExporterLogInflight,
descrMetricOtelSdkExporterLogInflight,
unitMetricOtelSdkExporterLogInflight);
}
/**
The number of metric data points for which the export has finished, either successful or failed.
<p>
For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code
error.type @endcode MUST contain the failure cause. For exporters with partial success semantics
(e.g. OTLP with @code rejected_data_points @endcode), rejected data points MUST count as failed
and only non-rejected data points count as success. If no rejection reason is available, @code
rejected @endcode SHOULD be used as value for @code error.type @endcode. <p> counter
*/
static constexpr const char *kMetricOtelSdkExporterMetricDataPointExported =
"otel.sdk.exporter.metric_data_point.exported";
static constexpr const char *descrMetricOtelSdkExporterMetricDataPointExported =
"The number of metric data points for which the export has finished, either successful or "
"failed.";
static constexpr const char *unitMetricOtelSdkExporterMetricDataPointExported = "{data_point}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkExporterMetricDataPointExported(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkExporterMetricDataPointExported,
descrMetricOtelSdkExporterMetricDataPointExported,
unitMetricOtelSdkExporterMetricDataPointExported);
}
static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkExporterMetricDataPointExported(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkExporterMetricDataPointExported,
descrMetricOtelSdkExporterMetricDataPointExported,
unitMetricOtelSdkExporterMetricDataPointExported);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterMetricDataPointExported(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkExporterMetricDataPointExported,
descrMetricOtelSdkExporterMetricDataPointExported,
unitMetricOtelSdkExporterMetricDataPointExported);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterMetricDataPointExported(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkExporterMetricDataPointExported,
descrMetricOtelSdkExporterMetricDataPointExported,
unitMetricOtelSdkExporterMetricDataPointExported);
}
/**
The number of metric data points which were passed to the exporter, but that have not been
exported yet (neither successful, nor failed). <p> For successful exports, @code error.type
@endcode MUST NOT be set. For failed exports, @code error.type @endcode MUST contain the failure
cause. <p> updowncounter
*/
static constexpr const char *kMetricOtelSdkExporterMetricDataPointInflight =
"otel.sdk.exporter.metric_data_point.inflight";
static constexpr const char *descrMetricOtelSdkExporterMetricDataPointInflight =
"The number of metric data points which were passed to the exporter, but that have not been "
"exported yet (neither successful, nor failed).";
static constexpr const char *unitMetricOtelSdkExporterMetricDataPointInflight = "{data_point}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkExporterMetricDataPointInflight(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkExporterMetricDataPointInflight,
descrMetricOtelSdkExporterMetricDataPointInflight,
unitMetricOtelSdkExporterMetricDataPointInflight);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkExporterMetricDataPointInflight(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkExporterMetricDataPointInflight,
descrMetricOtelSdkExporterMetricDataPointInflight,
unitMetricOtelSdkExporterMetricDataPointInflight);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterMetricDataPointInflight(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(
kMetricOtelSdkExporterMetricDataPointInflight,
descrMetricOtelSdkExporterMetricDataPointInflight,
unitMetricOtelSdkExporterMetricDataPointInflight);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterMetricDataPointInflight(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(
kMetricOtelSdkExporterMetricDataPointInflight,
descrMetricOtelSdkExporterMetricDataPointInflight,
unitMetricOtelSdkExporterMetricDataPointInflight);
}
/**
The duration of exporting a batch of telemetry records.
<p>
This metric defines successful operations using the full success definitions for <a
href="https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1">http</a>
and <a
href="https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success">grpc</a>.
Anything else is defined as an unsuccessful operation. For successful operations, @code error.type
@endcode MUST NOT be set. For unsuccessful export operations, @code error.type @endcode MUST
contain a relevant failure cause. <p> histogram
*/
static constexpr const char *kMetricOtelSdkExporterOperationDuration =
"otel.sdk.exporter.operation.duration";
static constexpr const char *descrMetricOtelSdkExporterOperationDuration =
"The duration of exporting a batch of telemetry records.";
static constexpr const char *unitMetricOtelSdkExporterOperationDuration = "s";
static inline nostd::unique_ptr<metrics::Histogram<uint64_t>>
CreateSyncInt64MetricOtelSdkExporterOperationDuration(metrics::Meter *meter)
{
return meter->CreateUInt64Histogram(kMetricOtelSdkExporterOperationDuration,
descrMetricOtelSdkExporterOperationDuration,
unitMetricOtelSdkExporterOperationDuration);
}
static inline nostd::unique_ptr<metrics::Histogram<double>>
CreateSyncDoubleMetricOtelSdkExporterOperationDuration(metrics::Meter *meter)
{
return meter->CreateDoubleHistogram(kMetricOtelSdkExporterOperationDuration,
descrMetricOtelSdkExporterOperationDuration,
unitMetricOtelSdkExporterOperationDuration);
}
/**
The number of spans for which the export has finished, either successful or failed.
<p>
For successful exports, @code error.type @endcode MUST NOT be set. For failed exports, @code
error.type @endcode MUST contain the failure cause. For exporters with partial success semantics
(e.g. OTLP with @code rejected_spans @endcode), rejected spans MUST count as failed and only
non-rejected spans count as success. If no rejection reason is available, @code rejected @endcode
SHOULD be used as value for @code error.type @endcode. <p> counter
*/
static constexpr const char *kMetricOtelSdkExporterSpanExported = "otel.sdk.exporter.span.exported";
static constexpr const char *descrMetricOtelSdkExporterSpanExported =
"The number of spans for which the export has finished, either successful or failed.";
static constexpr const char *unitMetricOtelSdkExporterSpanExported = "{span}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkExporterSpanExported(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkExporterSpanExported,
descrMetricOtelSdkExporterSpanExported,
unitMetricOtelSdkExporterSpanExported);
}
static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkExporterSpanExported(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkExporterSpanExported,
descrMetricOtelSdkExporterSpanExported,
unitMetricOtelSdkExporterSpanExported);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterSpanExported(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkExporterSpanExported,
descrMetricOtelSdkExporterSpanExported,
unitMetricOtelSdkExporterSpanExported);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterSpanExported(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkExporterSpanExported,
descrMetricOtelSdkExporterSpanExported,
unitMetricOtelSdkExporterSpanExported);
}
/**
Deprecated, use @code otel.sdk.exporter.span.exported @endcode instead.
@deprecated
{"note": "Replaced by @code otel.sdk.exporter.span.exported @endcode.", "reason": "renamed",
"renamed_to": "otel.sdk.exporter.span.exported"} <p> updowncounter
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricOtelSdkExporterSpanExportedCount =
"otel.sdk.exporter.span.exported.count";
OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricOtelSdkExporterSpanExportedCount =
"Deprecated, use `otel.sdk.exporter.span.exported` instead.";
OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricOtelSdkExporterSpanExportedCount =
"{span}";
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkExporterSpanExportedCount(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkExporterSpanExportedCount,
descrMetricOtelSdkExporterSpanExportedCount,
unitMetricOtelSdkExporterSpanExportedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkExporterSpanExportedCount(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkExporterSpanExportedCount,
descrMetricOtelSdkExporterSpanExportedCount,
unitMetricOtelSdkExporterSpanExportedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterSpanExportedCount(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkExporterSpanExportedCount,
descrMetricOtelSdkExporterSpanExportedCount,
unitMetricOtelSdkExporterSpanExportedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterSpanExportedCount(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkExporterSpanExportedCount,
descrMetricOtelSdkExporterSpanExportedCount,
unitMetricOtelSdkExporterSpanExportedCount);
}
/**
The number of spans which were passed to the exporter, but that have not been exported yet
(neither successful, nor failed). <p> For successful exports, @code error.type @endcode MUST NOT
be set. For failed exports, @code error.type @endcode MUST contain the failure cause. <p>
updowncounter
*/
static constexpr const char *kMetricOtelSdkExporterSpanInflight = "otel.sdk.exporter.span.inflight";
static constexpr const char *descrMetricOtelSdkExporterSpanInflight =
"The number of spans which were passed to the exporter, but that have not been exported yet "
"(neither successful, nor failed).";
static constexpr const char *unitMetricOtelSdkExporterSpanInflight = "{span}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkExporterSpanInflight(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkExporterSpanInflight,
descrMetricOtelSdkExporterSpanInflight,
unitMetricOtelSdkExporterSpanInflight);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkExporterSpanInflight(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkExporterSpanInflight,
descrMetricOtelSdkExporterSpanInflight,
unitMetricOtelSdkExporterSpanInflight);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterSpanInflight(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkExporterSpanInflight,
descrMetricOtelSdkExporterSpanInflight,
unitMetricOtelSdkExporterSpanInflight);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterSpanInflight(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkExporterSpanInflight,
descrMetricOtelSdkExporterSpanInflight,
unitMetricOtelSdkExporterSpanInflight);
}
/**
Deprecated, use @code otel.sdk.exporter.span.inflight @endcode instead.
@deprecated
{"note": "Replaced by @code otel.sdk.exporter.span.inflight @endcode.", "reason": "renamed",
"renamed_to": "otel.sdk.exporter.span.inflight"} <p> updowncounter
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricOtelSdkExporterSpanInflightCount =
"otel.sdk.exporter.span.inflight.count";
OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricOtelSdkExporterSpanInflightCount =
"Deprecated, use `otel.sdk.exporter.span.inflight` instead.";
OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricOtelSdkExporterSpanInflightCount =
"{span}";
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkExporterSpanInflightCount(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkExporterSpanInflightCount,
descrMetricOtelSdkExporterSpanInflightCount,
unitMetricOtelSdkExporterSpanInflightCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkExporterSpanInflightCount(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkExporterSpanInflightCount,
descrMetricOtelSdkExporterSpanInflightCount,
unitMetricOtelSdkExporterSpanInflightCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkExporterSpanInflightCount(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkExporterSpanInflightCount,
descrMetricOtelSdkExporterSpanInflightCount,
unitMetricOtelSdkExporterSpanInflightCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkExporterSpanInflightCount(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkExporterSpanInflightCount,
descrMetricOtelSdkExporterSpanInflightCount,
unitMetricOtelSdkExporterSpanInflightCount);
}
/**
The number of logs submitted to enabled SDK Loggers.
<p>
counter
*/
static constexpr const char *kMetricOtelSdkLogCreated = "otel.sdk.log.created";
static constexpr const char *descrMetricOtelSdkLogCreated =
"The number of logs submitted to enabled SDK Loggers.";
static constexpr const char *unitMetricOtelSdkLogCreated = "{log_record}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricOtelSdkLogCreated(
metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkLogCreated, descrMetricOtelSdkLogCreated,
unitMetricOtelSdkLogCreated);
}
static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricOtelSdkLogCreated(
metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkLogCreated, descrMetricOtelSdkLogCreated,
unitMetricOtelSdkLogCreated);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkLogCreated(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkLogCreated, descrMetricOtelSdkLogCreated,
unitMetricOtelSdkLogCreated);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkLogCreated(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(
kMetricOtelSdkLogCreated, descrMetricOtelSdkLogCreated, unitMetricOtelSdkLogCreated);
}
/**
The duration of the collect operation of the metric reader.
<p>
For successful collections, @code error.type @endcode MUST NOT be set. For failed collections,
@code error.type @endcode SHOULD contain the failure cause. It can happen that metrics collection
is successful for some MetricProducers, while others fail. In that case @code error.type @endcode
SHOULD be set to any of the failure causes. <p> histogram
*/
static constexpr const char *kMetricOtelSdkMetricReaderCollectionDuration =
"otel.sdk.metric_reader.collection.duration";
static constexpr const char *descrMetricOtelSdkMetricReaderCollectionDuration =
"The duration of the collect operation of the metric reader.";
static constexpr const char *unitMetricOtelSdkMetricReaderCollectionDuration = "s";
static inline nostd::unique_ptr<metrics::Histogram<uint64_t>>
CreateSyncInt64MetricOtelSdkMetricReaderCollectionDuration(metrics::Meter *meter)
{
return meter->CreateUInt64Histogram(kMetricOtelSdkMetricReaderCollectionDuration,
descrMetricOtelSdkMetricReaderCollectionDuration,
unitMetricOtelSdkMetricReaderCollectionDuration);
}
static inline nostd::unique_ptr<metrics::Histogram<double>>
CreateSyncDoubleMetricOtelSdkMetricReaderCollectionDuration(metrics::Meter *meter)
{
return meter->CreateDoubleHistogram(kMetricOtelSdkMetricReaderCollectionDuration,
descrMetricOtelSdkMetricReaderCollectionDuration,
unitMetricOtelSdkMetricReaderCollectionDuration);
}
/**
The number of log records for which the processing has finished, either successful or failed.
<p>
For successful processing, @code error.type @endcode MUST NOT be set. For failed processing, @code
error.type @endcode MUST contain the failure cause. For the SDK Simple and Batching Log Record
Processor a log record is considered to be processed already when it has been submitted to the
exporter, not when the corresponding export call has finished. <p> counter
*/
static constexpr const char *kMetricOtelSdkProcessorLogProcessed =
"otel.sdk.processor.log.processed";
static constexpr const char *descrMetricOtelSdkProcessorLogProcessed =
"The number of log records for which the processing has finished, either successful or failed.";
static constexpr const char *unitMetricOtelSdkProcessorLogProcessed = "{log_record}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkProcessorLogProcessed(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkProcessorLogProcessed,
descrMetricOtelSdkProcessorLogProcessed,
unitMetricOtelSdkProcessorLogProcessed);
}
static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkProcessorLogProcessed(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkProcessorLogProcessed,
descrMetricOtelSdkProcessorLogProcessed,
unitMetricOtelSdkProcessorLogProcessed);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorLogProcessed(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkProcessorLogProcessed,
descrMetricOtelSdkProcessorLogProcessed,
unitMetricOtelSdkProcessorLogProcessed);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorLogProcessed(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkProcessorLogProcessed,
descrMetricOtelSdkProcessorLogProcessed,
unitMetricOtelSdkProcessorLogProcessed);
}
/**
The maximum number of log records the queue of a given instance of an SDK Log Record processor can
hold. <p> Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log
Record Processor. <p> updowncounter
*/
static constexpr const char *kMetricOtelSdkProcessorLogQueueCapacity =
"otel.sdk.processor.log.queue.capacity";
static constexpr const char *descrMetricOtelSdkProcessorLogQueueCapacity =
"The maximum number of log records the queue of a given instance of an SDK Log Record "
"processor can hold.";
static constexpr const char *unitMetricOtelSdkProcessorLogQueueCapacity = "{log_record}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkProcessorLogQueueCapacity(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkProcessorLogQueueCapacity,
descrMetricOtelSdkProcessorLogQueueCapacity,
unitMetricOtelSdkProcessorLogQueueCapacity);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkProcessorLogQueueCapacity(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkProcessorLogQueueCapacity,
descrMetricOtelSdkProcessorLogQueueCapacity,
unitMetricOtelSdkProcessorLogQueueCapacity);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorLogQueueCapacity(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkProcessorLogQueueCapacity,
descrMetricOtelSdkProcessorLogQueueCapacity,
unitMetricOtelSdkProcessorLogQueueCapacity);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorLogQueueCapacity(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkProcessorLogQueueCapacity,
descrMetricOtelSdkProcessorLogQueueCapacity,
unitMetricOtelSdkProcessorLogQueueCapacity);
}
/**
The number of log records in the queue of a given instance of an SDK log processor.
<p>
Only applies to log record processors which use a queue, e.g. the SDK Batching Log Record
Processor. <p> updowncounter
*/
static constexpr const char *kMetricOtelSdkProcessorLogQueueSize =
"otel.sdk.processor.log.queue.size";
static constexpr const char *descrMetricOtelSdkProcessorLogQueueSize =
"The number of log records in the queue of a given instance of an SDK log processor.";
static constexpr const char *unitMetricOtelSdkProcessorLogQueueSize = "{log_record}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkProcessorLogQueueSize(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkProcessorLogQueueSize,
descrMetricOtelSdkProcessorLogQueueSize,
unitMetricOtelSdkProcessorLogQueueSize);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkProcessorLogQueueSize(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkProcessorLogQueueSize,
descrMetricOtelSdkProcessorLogQueueSize,
unitMetricOtelSdkProcessorLogQueueSize);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorLogQueueSize(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkProcessorLogQueueSize,
descrMetricOtelSdkProcessorLogQueueSize,
unitMetricOtelSdkProcessorLogQueueSize);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorLogQueueSize(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkProcessorLogQueueSize,
descrMetricOtelSdkProcessorLogQueueSize,
unitMetricOtelSdkProcessorLogQueueSize);
}
/**
The number of spans for which the processing has finished, either successful or failed.
<p>
For successful processing, @code error.type @endcode MUST NOT be set. For failed processing, @code
error.type @endcode MUST contain the failure cause. For the SDK Simple and Batching Span Processor
a span is considered to be processed already when it has been submitted to the exporter, not when
the corresponding export call has finished. <p> counter
*/
static constexpr const char *kMetricOtelSdkProcessorSpanProcessed =
"otel.sdk.processor.span.processed";
static constexpr const char *descrMetricOtelSdkProcessorSpanProcessed =
"The number of spans for which the processing has finished, either successful or failed.";
static constexpr const char *unitMetricOtelSdkProcessorSpanProcessed = "{span}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkProcessorSpanProcessed(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkProcessorSpanProcessed,
descrMetricOtelSdkProcessorSpanProcessed,
unitMetricOtelSdkProcessorSpanProcessed);
}
static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkProcessorSpanProcessed(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkProcessorSpanProcessed,
descrMetricOtelSdkProcessorSpanProcessed,
unitMetricOtelSdkProcessorSpanProcessed);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorSpanProcessed(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkProcessorSpanProcessed,
descrMetricOtelSdkProcessorSpanProcessed,
unitMetricOtelSdkProcessorSpanProcessed);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorSpanProcessed(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkProcessorSpanProcessed,
descrMetricOtelSdkProcessorSpanProcessed,
unitMetricOtelSdkProcessorSpanProcessed);
}
/**
Deprecated, use @code otel.sdk.processor.span.processed @endcode instead.
@deprecated
{"note": "Replaced by @code otel.sdk.processor.span.processed @endcode.", "reason": "renamed",
"renamed_to": "otel.sdk.processor.span.processed"} <p> updowncounter
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricOtelSdkProcessorSpanProcessedCount =
"otel.sdk.processor.span.processed.count";
OPENTELEMETRY_DEPRECATED static constexpr const char
*descrMetricOtelSdkProcessorSpanProcessedCount =
"Deprecated, use `otel.sdk.processor.span.processed` instead.";
OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricOtelSdkProcessorSpanProcessedCount =
"{span}";
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkProcessorSpanProcessedCount(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkProcessorSpanProcessedCount,
descrMetricOtelSdkProcessorSpanProcessedCount,
unitMetricOtelSdkProcessorSpanProcessedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkProcessorSpanProcessedCount(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkProcessorSpanProcessedCount,
descrMetricOtelSdkProcessorSpanProcessedCount,
unitMetricOtelSdkProcessorSpanProcessedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorSpanProcessedCount(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkProcessorSpanProcessedCount,
descrMetricOtelSdkProcessorSpanProcessedCount,
unitMetricOtelSdkProcessorSpanProcessedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorSpanProcessedCount(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkProcessorSpanProcessedCount,
descrMetricOtelSdkProcessorSpanProcessedCount,
unitMetricOtelSdkProcessorSpanProcessedCount);
}
/**
The maximum number of spans the queue of a given instance of an SDK span processor can hold.
<p>
Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.
<p>
updowncounter
*/
static constexpr const char *kMetricOtelSdkProcessorSpanQueueCapacity =
"otel.sdk.processor.span.queue.capacity";
static constexpr const char *descrMetricOtelSdkProcessorSpanQueueCapacity =
"The maximum number of spans the queue of a given instance of an SDK span processor can hold.";
static constexpr const char *unitMetricOtelSdkProcessorSpanQueueCapacity = "{span}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkProcessorSpanQueueCapacity(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkProcessorSpanQueueCapacity,
descrMetricOtelSdkProcessorSpanQueueCapacity,
unitMetricOtelSdkProcessorSpanQueueCapacity);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkProcessorSpanQueueCapacity(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkProcessorSpanQueueCapacity,
descrMetricOtelSdkProcessorSpanQueueCapacity,
unitMetricOtelSdkProcessorSpanQueueCapacity);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorSpanQueueCapacity(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkProcessorSpanQueueCapacity,
descrMetricOtelSdkProcessorSpanQueueCapacity,
unitMetricOtelSdkProcessorSpanQueueCapacity);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorSpanQueueCapacity(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkProcessorSpanQueueCapacity,
descrMetricOtelSdkProcessorSpanQueueCapacity,
unitMetricOtelSdkProcessorSpanQueueCapacity);
}
/**
The number of spans in the queue of a given instance of an SDK span processor.
<p>
Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.
<p>
updowncounter
*/
static constexpr const char *kMetricOtelSdkProcessorSpanQueueSize =
"otel.sdk.processor.span.queue.size";
static constexpr const char *descrMetricOtelSdkProcessorSpanQueueSize =
"The number of spans in the queue of a given instance of an SDK span processor.";
static constexpr const char *unitMetricOtelSdkProcessorSpanQueueSize = "{span}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkProcessorSpanQueueSize(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkProcessorSpanQueueSize,
descrMetricOtelSdkProcessorSpanQueueSize,
unitMetricOtelSdkProcessorSpanQueueSize);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkProcessorSpanQueueSize(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkProcessorSpanQueueSize,
descrMetricOtelSdkProcessorSpanQueueSize,
unitMetricOtelSdkProcessorSpanQueueSize);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkProcessorSpanQueueSize(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(kMetricOtelSdkProcessorSpanQueueSize,
descrMetricOtelSdkProcessorSpanQueueSize,
unitMetricOtelSdkProcessorSpanQueueSize);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkProcessorSpanQueueSize(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(kMetricOtelSdkProcessorSpanQueueSize,
descrMetricOtelSdkProcessorSpanQueueSize,
unitMetricOtelSdkProcessorSpanQueueSize);
}
/**
Use @code otel.sdk.span.started @endcode minus @code otel.sdk.span.live @endcode to derive this
value.
@deprecated
{"note": "Obsoleted.", "reason": "obsoleted"}
<p>
counter
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricOtelSdkSpanEnded =
"otel.sdk.span.ended";
OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricOtelSdkSpanEnded =
"Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value.";
OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricOtelSdkSpanEnded = "{span}";
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkSpanEnded(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkSpanEnded, descrMetricOtelSdkSpanEnded,
unitMetricOtelSdkSpanEnded);
}
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkSpanEnded(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkSpanEnded, descrMetricOtelSdkSpanEnded,
unitMetricOtelSdkSpanEnded);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkSpanEnded(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkSpanEnded, descrMetricOtelSdkSpanEnded,
unitMetricOtelSdkSpanEnded);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkSpanEnded(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkSpanEnded, descrMetricOtelSdkSpanEnded,
unitMetricOtelSdkSpanEnded);
}
/**
Use @code otel.sdk.span.started @endcode minus @code otel.sdk.span.live @endcode to derive this
value.
@deprecated
{"note": "Obsoleted.", "reason": "obsoleted"}
<p>
counter
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricOtelSdkSpanEndedCount =
"otel.sdk.span.ended.count";
OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricOtelSdkSpanEndedCount =
"Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value.";
OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricOtelSdkSpanEndedCount = "{span}";
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Counter<uint64_t>>
CreateSyncInt64MetricOtelSdkSpanEndedCount(metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkSpanEndedCount, descrMetricOtelSdkSpanEndedCount,
unitMetricOtelSdkSpanEndedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::Counter<double>>
CreateSyncDoubleMetricOtelSdkSpanEndedCount(metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkSpanEndedCount, descrMetricOtelSdkSpanEndedCount,
unitMetricOtelSdkSpanEndedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkSpanEndedCount(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(kMetricOtelSdkSpanEndedCount,
descrMetricOtelSdkSpanEndedCount,
unitMetricOtelSdkSpanEndedCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkSpanEndedCount(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(kMetricOtelSdkSpanEndedCount,
descrMetricOtelSdkSpanEndedCount,
unitMetricOtelSdkSpanEndedCount);
}
/**
The number of created spans with @code recording=true @endcode for which the end operation has not
been called yet. <p> updowncounter
*/
static constexpr const char *kMetricOtelSdkSpanLive = "otel.sdk.span.live";
static constexpr const char *descrMetricOtelSdkSpanLive =
"The number of created spans with `recording=true` for which the end operation has not been "
"called yet.";
static constexpr const char *unitMetricOtelSdkSpanLive = "{span}";
static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkSpanLive(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(kMetricOtelSdkSpanLive, descrMetricOtelSdkSpanLive,
unitMetricOtelSdkSpanLive);
}
static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkSpanLive(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(kMetricOtelSdkSpanLive, descrMetricOtelSdkSpanLive,
unitMetricOtelSdkSpanLive);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkSpanLive(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(
kMetricOtelSdkSpanLive, descrMetricOtelSdkSpanLive, unitMetricOtelSdkSpanLive);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkSpanLive(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(
kMetricOtelSdkSpanLive, descrMetricOtelSdkSpanLive, unitMetricOtelSdkSpanLive);
}
/**
Deprecated, use @code otel.sdk.span.live @endcode instead.
@deprecated
{"note": "Replaced by @code otel.sdk.span.live @endcode.", "reason": "renamed", "renamed_to":
"otel.sdk.span.live"} <p> updowncounter
*/
OPENTELEMETRY_DEPRECATED static constexpr const char *kMetricOtelSdkSpanLiveCount =
"otel.sdk.span.live.count";
OPENTELEMETRY_DEPRECATED static constexpr const char *descrMetricOtelSdkSpanLiveCount =
"Deprecated, use `otel.sdk.span.live` instead.";
OPENTELEMETRY_DEPRECATED static constexpr const char *unitMetricOtelSdkSpanLiveCount = "{span}";
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<int64_t>>
CreateSyncInt64MetricOtelSdkSpanLiveCount(metrics::Meter *meter)
{
return meter->CreateInt64UpDownCounter(
kMetricOtelSdkSpanLiveCount, descrMetricOtelSdkSpanLiveCount, unitMetricOtelSdkSpanLiveCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::unique_ptr<metrics::UpDownCounter<double>>
CreateSyncDoubleMetricOtelSdkSpanLiveCount(metrics::Meter *meter)
{
return meter->CreateDoubleUpDownCounter(
kMetricOtelSdkSpanLiveCount, descrMetricOtelSdkSpanLiveCount, unitMetricOtelSdkSpanLiveCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkSpanLiveCount(metrics::Meter *meter)
{
return meter->CreateInt64ObservableUpDownCounter(
kMetricOtelSdkSpanLiveCount, descrMetricOtelSdkSpanLiveCount, unitMetricOtelSdkSpanLiveCount);
}
OPENTELEMETRY_DEPRECATED static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkSpanLiveCount(metrics::Meter *meter)
{
return meter->CreateDoubleObservableUpDownCounter(
kMetricOtelSdkSpanLiveCount, descrMetricOtelSdkSpanLiveCount, unitMetricOtelSdkSpanLiveCount);
}
/**
The number of created spans.
<p>
Implementations MUST record this metric for all spans, even for non-recording ones.
<p>
counter
*/
static constexpr const char *kMetricOtelSdkSpanStarted = "otel.sdk.span.started";
static constexpr const char *descrMetricOtelSdkSpanStarted = "The number of created spans.";
static constexpr const char *unitMetricOtelSdkSpanStarted = "{span}";
static inline nostd::unique_ptr<metrics::Counter<uint64_t>> CreateSyncInt64MetricOtelSdkSpanStarted(
metrics::Meter *meter)
{
return meter->CreateUInt64Counter(kMetricOtelSdkSpanStarted, descrMetricOtelSdkSpanStarted,
unitMetricOtelSdkSpanStarted);
}
static inline nostd::unique_ptr<metrics::Counter<double>> CreateSyncDoubleMetricOtelSdkSpanStarted(
metrics::Meter *meter)
{
return meter->CreateDoubleCounter(kMetricOtelSdkSpanStarted, descrMetricOtelSdkSpanStarted,
unitMetricOtelSdkSpanStarted);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncInt64MetricOtelSdkSpanStarted(metrics::Meter *meter)
{
return meter->CreateInt64ObservableCounter(
kMetricOtelSdkSpanStarted, descrMetricOtelSdkSpanStarted, unitMetricOtelSdkSpanStarted);
}
static inline nostd::shared_ptr<metrics::ObservableInstrument>
CreateAsyncDoubleMetricOtelSdkSpanStarted(metrics::Meter *meter)
{
return meter->CreateDoubleObservableCounter(
kMetricOtelSdkSpanStarted, descrMetricOtelSdkSpanStarted, unitMetricOtelSdkSpanStarted);
}
} // namespace otel
} // namespace semconv
OPENTELEMETRY_END_NAMESPACE
|