document that examplars are not stable (#1091)

noted in TC review. Java moved their examplar code into an internal package, and
documented that it may change. We don't have an internal package, so document
the warning in a few places.
This commit is contained in:
Brett McBride 2023-08-01 08:09:07 +10:00 committed by GitHub
parent 7b8daff5ef
commit ff15cc7037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 0 deletions

View File

@ -8,6 +8,10 @@ use OpenTelemetry\Context\ContextInterface;
use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
/**
* The exemplar spec is not yet stable, and can change at any time.
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
*/
final class AllExemplarFilter implements ExemplarFilterInterface
{
public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool

View File

@ -8,6 +8,10 @@ use OpenTelemetry\Context\ContextInterface;
use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
/**
* The exemplar spec is not yet stable, and can change at any time.
* see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
*/
final class NoneExemplarFilter implements ExemplarFilterInterface
{
public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool

View File

@ -9,6 +9,10 @@ use OpenTelemetry\Context\ContextInterface;
use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
/**
* The exemplar spec is not yet stable, and can change at any time.
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
*/
final class WithSampledTraceExemplarFilter implements ExemplarFilterInterface
{
public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool

View File

@ -7,6 +7,10 @@ namespace OpenTelemetry\SDK\Metrics\Exemplar;
use OpenTelemetry\Context\ContextInterface;
use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
/**
* The exemplar spec is not yet stable, and can change at any time.
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
*/
interface ExemplarFilterInterface
{
/**

View File

@ -7,6 +7,10 @@ namespace OpenTelemetry\SDK\Metrics\Exemplar;
use OpenTelemetry\Context\ContextInterface;
use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
/**
* The exemplar spec is not yet stable, and can change at any time.
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
*/
final class FilteredReservoir implements ExemplarReservoirInterface
{
private ExemplarReservoirInterface $reservoir;