Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring suggestions for network attributes related stuff #751

Open
surbhiia opened this issue Jan 16, 2025 · 0 comments
Open

Refactoring suggestions for network attributes related stuff #751

surbhiia opened this issue Jan 16, 2025 · 0 comments

Comments

@surbhiia
Copy link
Contributor

Currently, the project has the following modules/folders related to network attributes:

The above division of separate work in separate folders/modules makes sense and is also needed to have a clean dependency graph among them all. There are a few minor things I think we should refactor to make it more readable/usable:

  • Rename instrumentation module to something better than what it currently is - "network". It can be confused for network request interception. Can we rename it to something like - "networkchange"?
  • Can we drop "internal/features" or just drop "features" if we still want to keep it internal from /common/main/java/io/opentelemetry/android/common/internal/features/networkattributes/?
  • Extract NetworkAttributesSpanAppender and all other span processors like ScreenAttributesSpanProcessor, SessionIdSpanAppender and GlobalAtributesSpanAppender in their own module to allow for reusability? (Contrary to the span processors, all log processors do have a house at a single place. They can perhaps be extracted in the same new module or a separate one for them?)
  • A small duplication I noticed - Instead of duplicating NETWORK_STATUS_KEY in NetworkApplicationListener,, NetworkChangeMonitorTest can utilize the same from NetworkChangeAttributesExtractor if feasible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant