The new names
Every level now has one word: a session holds traces, and a trace holds spans.
Test Case keeps its name. Only the collection around it is now a dataset, so
galtea.test_cases is unchanged.
Check your traces calls
If you used galtea.traces for steps, use galtea.spans instead:
Only one of those calls stays quiet when you leave it unchanged. This is what each one does:
createandcreate_batchraise an error naminggaltea.spans. Nothing is written.create_batch(traces=[...])andlist(inference_result_id=...)raise a plainTypeErrorabout an unexpected keyword argument. The error is correct but says nothing about spans.list(session_id=...)is the one silent case. It returns the session’s traces where it used to return its spans, and reports no error. Search your code for it.list(id=...),get(...)anddelete(...)given the id of a span return a not-found error. Nothing is deleted.inference_result_id=is a supported alias ongetanddelete, so passing it does not fail either; the id is what fails.
What the new code looks like
A dataset list, a trace, a span inside that trace, and the spans of that trace:Names that keep working
These still work in 5.0.0. Each one prints a warning with the new name and the line to change. They are removed in a later release, so update them when you can. Accessors
Classes you import
Tracing helpers
Your instrumented code keeps recording the same data through the old helpers, so you can rename them at your own pace.
All of these are imported from
galtea (from galtea import start_span) except the flush helpers, which live in galtea.infrastructure.telemetry.provider under both names.
Arguments and fields
Two of those rows need a second look:
inference_results=is also in code you wrote yourself. ACustomScoreEvaluationMetricsubclass declares it as a parameter of its ownmeasure()method. Rename it in your subclass signature as well as at the call site. The SDK reads your signature and warns you if it still saysinference_results.galtea.metrics.create(test_type=...)is the exception to thetest_type=row. There, the parameter was retired rather than renamed: it is no longer used to create a metric and there is nodataset_type=to move to. Delete the argument instead of renaming it.
Names that stop working
Names outside your Python code
Two more places carry the old names, and neither is Python. Both have a new spelling, and both still accept the old one. Endpoint Connection input templates. The placeholders you write in the template Galtea sends to your product:{{ test_case_id }} is unchanged, because Test Case keeps its name.
OpenTelemetry span attributes. The attribute keys your own instrumentation sets when you export spans to Galtea:
If a span carries both names for the same field, the new name wins, unless it was sent with no value at all.
You do not need to change anything for spans the SDK sends for you, through
@traced, start_span, or set_context. The SDK still sends the old keys, and Galtea reads them.
CLI commands
The CLI has no aliases. An old command fails withunknown command.
Run
galtea sync after upgrading, then galtea <noun> --help to see the verbs.
Staying on 4.x
Not ready to migrate the SDK? Pin it to the last version with the old names:requirements.txt or pyproject.toml, not only in one shell, because pip install -U galtea ignores a pin you never wrote down.
Checklist
- Search for
galtea.traces. Every hit is either a trace call that is already correct or a span call to move togaltea.spans. Checklist,getanddeleteby hand, because those run either way. - Search for
inference_result,test_excepttest_case,galtea.tests, and theTestandInferenceResultclass names. These keep working with a warning, so rename them when convenient. - Run your code once and read the warnings. Each one names the new spelling and the line to change.
- On the CLI, swap
galtea inference-resultsforgaltea traces,galtea testsforgaltea datasets, and any span usage ofgaltea tracesforgaltea spans. - Last, and only after checking your Galtea version, update the two names outside your Python code: the template placeholders and the OpenTelemetry attribute keys.