Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Documentation on tag key restrictions do not match Stackdriver. #666

Description

@kunalq

The documentation states that valid ASCII printable characters "between 32 and 126, inclusive" are valid tag keys for metrics; in fact, Stackdriver appears to accept only alphanumeric characters.

I received the following error when attempting to include forward slashes in the label (to match our tracing labels):

Apr 11, 2019 1:40:29 PM io.opencensus.exporter.stats.stackdriver.StackdriverExporterWorker registerMetricDescriptor
WARNING: ApiException thrown when creating MetricDescriptor.
com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Field metricDescriptor.labels[0].key had an invalid value of "foo/bar": Label key contains invalid characters.
        at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:49)
        at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
        at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
        at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
        at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
        at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1052)
        at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
[snip]

Doc in question: https://github.com/census-instrumentation/opencensus-website/blob/master/content/tag/key.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions