OpenCensus is being archived! Read the blog post to learn more

TagKey

TagKey

The key to filter or group metrics.

Restrictions

Example

import "go.opencensus.io/tag"

keyMethod, _ := tag.NewKey("method")
import opencensus.tags import tag_key

keyMethod = tag_key.TagKey("method")
import io.opencensus.tags.Tags;

private static final TagKey KEY_METHOD = TagKey.create("method");
#include "opencensus/tags/tag_key.h"

// Initialize on demand in order to avoid initialization order issues.
opencensus::tags::TagKey MethodKey() {
  static const auto key = opencensus::tags::TagKey::Register("method");
  return key;
}
const methodKey = { name: "method" };

References

Resource URL
Specs definition specs/TagContext.TagKey
Go TagKey API TagKey
Java TagKey API TagKey JavaDoc
Python TagKey reference Github implementation
C++ Tags reference Tags source
Node.js TagKey reference Github implementation