{"id":13625878,"url":"https://github.com/ryansb/otelme","last_synced_at":"2025-04-24T01:23:24.976Z","repository":{"id":95002364,"uuid":"400290224","full_name":"ryansb/otelme","owner":"ryansb","description":"A low-friction OpenTelemetry wrapper for Python apps. It comes with sugar over basic spanning and the `tell` magic receiver","archived":false,"fork":false,"pushed_at":"2021-08-30T13:30:58.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-04-13T02:33:25.572Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/ryansb.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}},"created_at":"2021-08-26T19:57:07.000Z","updated_at":"2021-09-16T04:17:34.000Z","dependencies_parsed_at":"2023-06-11T13:45:26.955Z","dependency_job_id":null,"html_url":"https://github.com/ryansb/otelme","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryansb%2Fotelme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryansb%2Fotelme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryansb%2Fotelme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryansb%2Fotelme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryansb","download_url":"https://codeload.github.com/ryansb/otelme/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250541883,"owners_count":21447600,"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","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":"2024-08-01T21:02:04.415Z","updated_at":"2025-04-24T01:23:24.958Z","avatar_url":"https://github.com/ryansb.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# otelme - pronounced \"Oh, tell me\"\n\nA low-friction OpenTelemetry wrapper for Python apps. It comes with sugar over basic spanning and the `tell` magic receiver.\n\n## Usage\n\nUse context managers or decorators to automatically create scoped spans:\n\n```python\nwith telme.tell('update_user_record'):\n    telme.tell('a') | 'b'\n    ...\n\n@telme.tell\ndef myfunc():\n    ...\n\n@telme.tell('different_name')\ndef myfunc():\n    ...\n```\n\nSave the user friend count before adding to it and saving it to a variable\n\n```python\nnew_count = telme.tell('friends') @ len(user.friends) + 1\n```\n\nSave the result of `count + 1` as the attribute 'newcount' on the current span\n\n```python\ntelme.tell('newcount') + count\nnew_count = telme.tell('newcount') + 1\n```\n\nUse a splat (`*`) operator to add a whole dict a JSON attribute on the current trace\n\n```python\ntelme.tell('explosion') * {'bang': 'loud', 'flame': 'big'}\n# adds span attr: {'explosion': '{\"bang\": \"loud\", \"flame\": \"big\"}'\n```\n\nUse double-splat (`**`) operator to hoist a dict by its keys on the current trace\n\n```python\ntelme.tell('explosion') ** {'bang': 'loud', 'flame': 'big'}\n# adds span attrs: {'explosion.bang': 'loud', 'explosion.flame': 'big'}\n```\n\nUse `notify` with the splat (`*`) operator to add a dict as an event on the current trace\n\n```python\ntelme.notify('explosion') ** {'bang': 'loud', 'flame': 'big'}\n# adds new event `explosion` with attrs: {'bang': 'loud', 'flame': 'big'}\n```\n\nInspired by [pipe](https://github.com/JulienPalard/Pipe), [q](https://github.com/zestyping/q), and the `rollup_field` support in [Honeycomb's beeline](https://docs.honeycomb.io/getting-data-in/python/beeline/).\n\n## Contributing\n\nAll help is welcome, especially help understanding how `otelme` is used and what other use cases we can help with. Not all pull requests will be accepted, before opening a PR with a feature please open an issue to discuss it to avoid doing work that can't be upstreamed.\n\n## License\n\n`otelme` is available under the MIT license, see `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryansb%2Fotelme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryansb%2Fotelme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryansb%2Fotelme/lists"}