Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

refactor: remove ZpagesExporter#getAllTraces #43

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

kjin
Copy link
Contributor

@kjin kjin commented Jun 14, 2018

This PR removes getAllTraces from the public UI of ZpagesExporter. It was used in two places:

  • The Tracez page handler
    • This has been changed so that the ZpagesExporter and TracezPageHandler classes instead share a reference to the map of all traces.
  • Tests
    • I have added an optional json=1 query flag that reports the JSON object that contains the information used when rendering the main page.
    • Tests use this flag to get traces from the server instead of using ZpagesExporter#getAllTraces.

To be able to report JSON information, we need to serialize traces. However, there is no common way to do so, because SpanBase objects in the core module are not serializable (they contain circular references). For that reason I have added a TODO to make it serializable, and in the meantime have patched together a function that partially clones a span object (serializable properties only).

@kjin kjin requested review from ofrobots and a team June 14, 2018 22:56
@kjin kjin merged commit 09d4cf5 into census-instrumentation:master Jun 15, 2018
kjin added a commit to kjin/opencensus-node that referenced this pull request Aug 24, 2018
kjin added a commit to kjin/opencensus-node that referenced this pull request Aug 24, 2018
kjin added a commit to kjin/opencensus-node that referenced this pull request Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants