Skip to content

Commit

Permalink
Revert "feat(semcov): add metadata" (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking authored Feb 7, 2024
1 parent 0174830 commit e83a262
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
5 changes: 0 additions & 5 deletions js/.changeset/cuddly-shoes-beg.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const SemanticAttributePrefixes = {
embedding: "embedding",
tool: "tool",
tool_call: "tool_call",
metadata: "metadata",
openinference: "openinference",
} as const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,6 @@ class ToolCallAttributes:
during a tool call.
"""

METADATA_PREFIX = "metadata"
"""
The prefix for all metadata attributes. Metadata attributes are used to store
user-defined key-value pairs. For example, LangChain uses metadata to store
user-defined attributes for a chain.
"""

class MetadataAttributes:
"""
Attributes for metadata
"""

TAGS: str = f"{METADATA_PREFIX}.tags"


class OpenInferenceSpanKindValues(Enum):
TOOL = "TOOL"
Expand Down
4 changes: 1 addition & 3 deletions spec/semantic_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ operations used by applications. These conventions are used to populate the `att
The following attributes are reserved and MUST be supported by all OpenInference Tracing SDKs:

| Attribute | Type | Example | Description |
| -------------------------------------- | --------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------- |
|----------------------------------------|-----------------|----------------------------------------------------------------------------|------------------------------------------------------------------|
| `openinference.span.kind` | String | `"CHAIN"` | The kind of span (e.g., `CHAIN`, `LLM`, `RETRIEVER`, `RERANKER`) |
| `exception.type` | String | `"NullPointerException"` | The type of exception that was thrown |
| `exception.message` | String | `"Null value encountered"` | Detailed message describing the exception |
Expand Down Expand Up @@ -53,7 +53,5 @@ The following attributes are reserved and MUST be supported by all OpenInference
| `reranker.query` | String | `"How to format timestamp?"` | Query parameter of the reranker |
| `reranker.model_name` | String | `"cross-encoder/ms-marco-MiniLM-L-12-v2"` | Model name of the reranker |
| `reranker.top_k` | Integer | 3 | Top K parameter of the reranker |
| `metadata.tags` | List of strings | ["shopping", "travel"] | List of tags to give the span a category |
| `metadata.*` | Any | Any OTEL-compatible value | User-defined metadata for a chain or other span kind |

Note: the `object` type refers to a set of key-value pairs also known as a `struct`, `mapping`, `dictionary`, etc.

0 comments on commit e83a262

Please sign in to comment.