aglinxinyuan opened a new pull request, #9233:
URL: https://github.com/apache/texera/pull/9233
### What changes were proposed in this PR?
Removes unreferenced classes, methods, and attributes in the
`common/observability` module:
1.
`common/observability/src/main/scala/org/apache/texera/observability/TraceparentValidator.scala`:
- Drops orphaned file (-98 lines) containing `TraceparentValidator`
(`validateTraceparent`, `validateTracestate`, `MaxTracestateLength`) with zero
production callers across the repository.
2.
`common/observability/src/test/scala/org/apache/texera/observability/TraceparentValidatorSpec.scala`:
- Drops companion spec file (-124 lines).
3.
`common/observability/src/main/scala/org/apache/texera/observability/TexeraTracer.scala`:
- Drops unreferenced `currentContext` snapshot helper and unused
`io.opentelemetry.context.Context` import (-9 lines).
4.
`common/observability/src/test/scala/org/apache/texera/observability/TexeraTracerSpec.scala`:
- Drops unit tests for `currentContext` and companion unused import (-15
lines).
5.
`common/observability/src/main/scala/org/apache/texera/observability/SpanAttrs.scala`:
- Drops unused standard correlation attribute keys `ProjectId`, `UserId`,
`OperatorId`, `OperatorName`, and `Outcome` (-5 lines), keeping active keys
`WorkflowId` and `ExecutionId`.
6.
`common/observability/src/test/scala/org/apache/texera/observability/SpanAttrsSpec.scala`:
- Drops test assertions for `OperatorName` (-2 lines).
**+0/-253 lines.** Pure refactoring with no behavior change.
### Any related issues, documentation, discussions?
Closes #9232.
### How was this PR tested?
- Scalafmt check passed:
```bash
sbt "project Observability" scalafmtCheck "Test / scalafmtCheck"
```
- Unit tests passed (76 tests, 6 suites):
```bash
sbt "project Observability" test
```
- Verified 0 callers repo-wide on `origin/main` for `TraceparentValidator`,
`TexeraTracer.currentContext`, and the dropped `SpanAttrs` keys (`ProjectId`,
`UserId`, `OperatorId`, `OperatorName`, `Outcome`).
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]