{"id":48346953,"url":"https://github.com/ngoldack/semantic-conventions-go","last_synced_at":"2026-04-05T07:30:26.257Z","repository":{"id":342097559,"uuid":"1172823405","full_name":"ngoldack/semantic-conventions-go","owner":"ngoldack","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-04T18:37:22.000Z","size":21,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T00:47:39.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ngoldack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-04T18:13:35.000Z","updated_at":"2026-03-04T18:37:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ngoldack/semantic-conventions-go","commit_stats":null,"previous_names":["ngoldack/semantic-conventions-go"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ngoldack/semantic-conventions-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoldack%2Fsemantic-conventions-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoldack%2Fsemantic-conventions-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoldack%2Fsemantic-conventions-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoldack%2Fsemantic-conventions-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngoldack","download_url":"https://codeload.github.com/ngoldack/semantic-conventions-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoldack%2Fsemantic-conventions-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31427539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T02:22:46.605Z","status":"ssl_error","status_checked_at":"2026-04-05T02:22:33.263Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-05T07:30:25.763Z","updated_at":"2026-04-05T07:30:26.249Z","avatar_url":"https://github.com/ngoldack.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# semantic-conventions-go\n\nGo package providing [OpenInference semantic conventions](https://arize-ai.github.io/openinference/spec/semantic_conventions.html) for tracing LLM applications, agents, and related AI systems.\n\n## Installation\n\n```sh\ngo get github.com/ngoldack/semantic-conventions-go\n```\n\nRequires Go 1.24+.\n\n## Usage\n\n### Attribute key constants\n\nUse predefined string constants for span attribute keys:\n\n```go\nimport semconv \"github.com/ngoldack/semantic-conventions-go\"\n\nspan.SetAttributes(\n    attribute.String(semconv.InputValue, \"What is the capital of France?\"),\n    attribute.String(semconv.InputMimeType, semconv.MimeTypeText.String()),\n    attribute.String(semconv.LLMModelName, \"gpt-4o\"),\n    attribute.String(semconv.OpenInferenceSpanKindKey, semconv.SpanKindLLM.String()),\n)\n```\n\n### Typed enums\n\nThe package provides typed string enums for well-known values:\n\n```go\nsemconv.SpanKindLLM       // OpenInferenceSpanKind = \"LLM\"\nsemconv.SpanKindAgent     // OpenInferenceSpanKind = \"AGENT\"\nsemconv.MessageRoleUser   // MessageRole = \"user\"\nsemconv.MessageRoleSystem // MessageRole = \"system\"\nsemconv.MimeTypeJSON      // MimeType = \"application/json\"\nsemconv.LLMSystemOpenAI   // LLMSystem = \"openai\"\nsemconv.LLMProviderAzure  // LLMProvider = \"azure\"\n```\n\n### Helper functions for flattened attributes\n\nOpenInference flattens nested lists into indexed attribute keys. Use the helper functions to build these keys:\n\n```go\n// \"llm.input_messages.0.message.role\"\nsemconv.InputMessageAttribute(0, semconv.MessageRoleKey)\n\n// \"llm.output_messages.0.message.content\"\nsemconv.OutputMessageAttribute(0, semconv.MessageContent)\n\n// \"llm.output_messages.0.message.tool_calls.0.tool_call.function.name\"\nsemconv.OutputMessageToolCallAttribute(0, 0, semconv.ToolCallFunctionName)\n\n// \"retrieval.documents.2.document.content\"\nsemconv.RetrievalDocumentAttribute(2, semconv.DocumentContent)\n\n// \"embedding.embeddings.0.embedding.text\"\nsemconv.EmbeddingAttribute(0, semconv.EmbeddingText)\n```\n\n### Configuration environment variables\n\nThe package exposes constants for OpenInference privacy/redaction environment variables:\n\n```go\nsemconv.EnvHideInputs          // \"OPENINFERENCE_HIDE_INPUTS\"\nsemconv.EnvHideOutputs         // \"OPENINFERENCE_HIDE_OUTPUTS\"\nsemconv.EnvHideInputMessages   // \"OPENINFERENCE_HIDE_INPUT_MESSAGES\"\nsemconv.EnvHideOutputMessages  // \"OPENINFERENCE_HIDE_OUTPUT_MESSAGES\"\nsemconv.EnvHideInputImages     // \"OPENINFERENCE_HIDE_INPUT_IMAGES\"\nsemconv.EnvBase64ImageMaxLength // \"OPENINFERENCE_BASE64_IMAGE_MAX_LENGTH\"\n```\n\nWhen content is hidden, attributes are replaced with `semconv.RedactedValue` (`\"__REDACTED__\"`).\n\n## Attribute Categories\n\n| Category | Example Constants |\n|---|---|\n| Input/Output | `InputValue`, `OutputValue`, `InputMimeType`, `OutputMimeType` |\n| LLM | `LLMModelName`, `LLMInvocationParameters`, `LLMTokenCountTotal`, `LLMCostTotal` |\n| Messages | `MessageRoleKey`, `MessageContent`, `MessageToolCalls` |\n| Message Content | `MessageContentTypeKey`, `MessageContentText`, `MessageContentImage` |\n| Documents | `DocumentID`, `DocumentContent`, `DocumentScore`, `DocumentMetadata` |\n| Embeddings | `EmbeddingText`, `EmbeddingModelName`, `EmbeddingVector` |\n| Retrieval | `RetrievalDocuments` |\n| Reranker | `RerankerQuery`, `RerankerModelName`, `RerankerTopK` |\n| Tools | `ToolName`, `ToolDescription`, `ToolParameters`, `ToolJSONSchema` |\n| Tool Calls | `ToolCallFunctionName`, `ToolCallFunctionArgumentsJSON`, `ToolCallID` |\n| Session/User | `SessionID`, `UserID` |\n| Agent | `AgentName` |\n| Graph | `GraphNodeID`, `GraphNodeName`, `GraphNodeParentID` |\n| Prompt Registry | `PromptVendor`, `PromptID`, `PromptURL` |\n| Exceptions | `ExceptionType`, `ExceptionMessage`, `ExceptionStacktrace` |\n\n## License\n\nSee [LICENSE](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngoldack%2Fsemantic-conventions-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngoldack%2Fsemantic-conventions-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngoldack%2Fsemantic-conventions-go/lists"}