TagKey
TagKey
The key to filter or group metrics.
Restrictions
- It MUST contain only printable ASCII (codes between 32 and 126, inclusive)
- The length must be greater than zero and less than 256
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 |