You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,15 +4,16 @@ A strongly-typed semantic convention library for OpenTelemetry instrumentation i
4
4
5
5
## Overview
6
6
7
-
This library provides Zig type definitions for OpenTelemetry semantic conventions, allowing you to use semantic convention attributesin a type-safe way in your Zig applications. The library mirrors the structure of the official [OpenTelemetry semantic conventions](https://github.com/open-telemetry/semantic-conventions)repository.
7
+
This library provides Zig type definitions for OpenTelemetry semantic conventions, allowing you to use semantic convention attributes, metrics, resources, and traces in a type-safe way in your Zig applications. The library is generated from the official [OpenTelemetry semantic conventions](https://github.com/open-telemetry/semantic-conventions)specification.
8
8
9
9
## Features
10
10
11
11
-**Strongly Typed**: All semantic convention attributes are defined with proper Zig types
12
-
-**Comprehensive**: Covers major semantic convention namespaces (HTTP, Network, URL, Server, Client, Error, User Agent, Telemetry)
13
-
-**Standards Compliant**: Based on OpenTelemetry specification v1.28.0
12
+
-**Comprehensive**: Covers all semantic convention namespaces (attributes, metrics, resources, traces)
13
+
-**Standards Compliant**: Based on OpenTelemetry specification v1.36.0
14
14
-**Zero Dependencies**: Uses only Zig standard library
15
-
-**Well Tested**: Comprehensive test coverage for all modules
15
+
-**Auto-generated**: Generated directly from the official semantic conventions specification
16
+
-**Rich Metadata**: Includes stability levels, requirement levels, descriptions, and well-known enum values
-`.stable` - The attribute is stable and should not change in backward-incompatible ways
202
+
-`.development` - The attribute is in development and may change
203
+
-`.deprecated` - The attribute is deprecated and should not be used
204
+
-`.experimental` - The attribute is experimental (alias for development)
205
+
206
+
### Requirement Levels
207
+
208
+
-`.required` - The attribute MUST be provided
209
+
-`.recommended` - The attribute SHOULD be provided when available
210
+
-`.opt_in` - The attribute MAY be provided but is not required or recommended by default
211
+
-`.conditionally_required` - The attribute is required under specific conditions
212
+
213
+
## Code Generation
214
+
215
+
This library is auto-generated from the OpenTelemetry semantic conventions specification using [Weaver](https://github.com/open-telemetry/weaver).
216
+
217
+
To regenerate the code:
218
+
219
+
```bash
220
+
zig build generate
125
221
```
126
222
223
+
This will run the generation script that downloads the latest semantic conventions and generates the Zig code.
224
+
127
225
## Testing
128
226
129
-
Run the test suite:
227
+
Run the tests:
130
228
131
229
```bash
132
230
zig build test
133
231
```
134
232
135
-
All modules include comprehensive tests covering:
136
-
- Attribute definitions and metadata
137
-
- Enum value parsing and conversion
138
-
- Helper function behavior
139
-
- Edge cases and validation
140
-
233
+
## Contributing
141
234
142
-
## Compatibility
235
+
Contributions are welcome! Please note that most of the code is auto-generated from the OpenTelemetry specification. If you want to add features or fix bugs, focus on:
143
236
144
-
-**Zig Version**: 0.14.x+
145
-
-**OpenTelemetry Spec**: v1.28.0
146
-
-**Platforms**: All platforms supported by Zig
237
+
-[src/types.zig](src/types.zig) - Core type definitions
238
+
-[build.zig](build.zig) - Build configuration
239
+
-[scripts/](scripts/) - Code generation scripts and templates
0 commit comments