https://github.com/v-sekai/godot_open_telemetry
https://github.com/v-sekai/godot_open_telemetry
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/v-sekai/godot_open_telemetry
- Owner: V-Sekai
- License: mit
- Created: 2024-06-09T17:48:55.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-09T17:56:15.000Z (11 months ago)
- Last Synced: 2024-06-09T19:08:37.282Z (11 months ago)
- Language: C++
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godot Engine Open Telemetry
```gdscript
extends Node3Dvar otel: OpenTelemetry = Opentelemetry.new()
func _ready() -> void:
var error = otel.init_tracer_provider("godot", "localhost:4317", Engine.get_version_info())
print(error)func _process(_delta) -> void:
var parent_span_id = otel.start_span("test-_ready")
var span_id = otel.start_span_with_parent("test-child", parent_span_id)
otel.add_event(span_id, "test-event")
otel.set_attributes(span_id, {"test-key": "test-value"})
otel.record_error(span_id, str(get_stack()))
otel.end_span(span_id)
otel.end_span(parent_span_id)func _exit_tree() -> void:
otel.shutdown()
```