{"id":15439453,"url":"https://github.com/mralias/otel-schema-utils","last_synced_at":"2025-10-08T12:50:10.847Z","repository":{"id":164925701,"uuid":"640272508","full_name":"MrAlias/otel-schema-utils","owner":"MrAlias","description":"Modification utilities for OpenTelemetry objects based on OpenTelemetry schemas","archived":false,"fork":false,"pushed_at":"2025-09-04T18:19:57.000Z","size":142,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-04T20:25:14.366Z","etag":null,"topics":["go","golang","opentelemetry","opentelemetry-go","otel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrAlias.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":".github/CODEOWNERS","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":"2023-05-13T14:43:15.000Z","updated_at":"2025-09-04T18:18:47.000Z","dependencies_parsed_at":"2024-04-11T17:47:06.068Z","dependency_job_id":"d0c8058f-0d1f-4c6c-b32d-6ffe89ac22a6","html_url":"https://github.com/MrAlias/otel-schema-utils","commit_stats":{"total_commits":55,"total_committers":3,"mean_commits":"18.333333333333332","dds":0.2545454545454545,"last_synced_commit":"4201bd1958726dd0af67555cea73b0f8bf380d6c"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MrAlias/otel-schema-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-schema-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-schema-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-schema-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-schema-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrAlias","download_url":"https://codeload.github.com/MrAlias/otel-schema-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrAlias%2Fotel-schema-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278948018,"owners_count":26073747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","golang","opentelemetry","opentelemetry-go","otel"],"created_at":"2024-10-01T19:06:28.273Z","updated_at":"2025-10-08T12:50:10.803Z","avatar_url":"https://github.com/MrAlias.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenTelemetry Schema Utilities\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/MrAlias/otel-schema-utils.svg)](https://pkg.go.dev/github.com/MrAlias/otel-schema-utils)\n[![CI](https://github.com/MrAlias/otel-schema-utils/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/MrAlias/otel-schema-utils/actions/workflows/golangci-lint.yml)\n\nThis repository provides conversion utilities for [OpenTelemetry Go] types using [OpenTelemetry schemas].\n\n:construction: This repository is a work in progress and not production ready.\n\n## Getting Started\n\nStart by importing the project.\n\n```go\nimport \"github.com/MrAlias/otel-schema-utils/schema\"\n```\n\nFrom there, construct a new `Converter` using the default client.\n\n```go\n// Passing nil here means the Converter will use schema.DefaultClient.\nconv := schema.NewConverter(nil)\n```\n\nUse the `Converter` to convert [OpenTelemetry Go] types.\nFor example a [`*resource.Resource`].\n\n```go\ntargetURL := \"https://opentelemetry.io/schemas/1.20.0\"\nr, err := conv.Resource(ctx, targetURL, myResource)\n// Handle err and use the v1.20.0 Resource r ...\n```\n\n## Clients\n\n`Client`s is used to fetch, cache, and parse [OpenTelemetry schemas].\nThese schema can be located locally or on remote hosts.\nMultiple constructors are provided to accommodate this variety in schema sources.\n\nAll clients will cache schemas.\nMeaning any schema they return will only be fetched once from its source.\nAll subsequent requests for that schema will returned the same value.\n\n### Static client\n\nA static client fetches a static set of schemas passed to the client when it is constructed.\nThese clients are created using the `NewStaticClient` function.\n\n### Local client\n\nA local client is a static client seeded with all OpenTelemetry schemas.\n\nThese clients are useful if you want to ensure the client does not fetch any remote schemas, but still want to support OpenTelemetry published schemas.\nThey are created using the `NewLocalClient` function.\n\n### HTTP client\n\nAn HTTP client fetches schemas with an HTTP request.\n\nThese clients are useful if you publish your own schemas or want to use 3rd-party schemas other than OpenTelemetry ones.\nThey are created using the `NewHTTPClient` function.\n\n### Default client\n\nA default client is provided as the `DefaultClient` variable.\nThis client will use a local client for all OpenTelemetry published schema, but also use an HTTP client for all uncached schemas.\n\n## License\n\nThis Go module is distributed under the Apache-2.0 license found in the [LICENSE](./LICENSE) file.\n\n[OpenTelemetry Go]: https://pkg.go.dev/go.opentelemetry.io/otel\n[OpenTelemetry schemas]: https://opentelemetry.io/docs/specs/otel/schemas/\n[`*resource.Resource`]: https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Resource\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmralias%2Fotel-schema-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmralias%2Fotel-schema-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmralias%2Fotel-schema-utils/lists"}