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

Add Span amount control mechanism, also memory limit mechanism #570

Merged
merged 5 commits into from Nov 15, 2017

Conversation

wu-sheng
Copy link
Member

@wu-sheng wu-sheng commented Nov 3, 2017

I want to make sure the amount of spans per segment is estimated, so in some meaning, the memory cost is estimated.

The default amount is 300, because unlikely a server segment trace have more spans than that, of course, you can override it through agent config mechanism.

@peng-yongsheng For collector side, I adjust the network protocol, add a new field isSizeLimited. If true, mean the control mechanism works, and not all spans uplink to collector. In this case, some parent span id in ref(from other backend application) is set to 0, because their parent span does not exist.

@ascrutae Since I adjust the core of agent, I think you need to run automatic test and integration test both. Feedback when you have done.

@peng-yongsheng @ascrutae Some days later, we should adjust trace stack UI to tell people the segment don't contain all spans because of control mechanism.

FYI @oracle219, I think you are interesting in this pr.

return activeSpanStack.getFirst();
}

private boolean isLimitMechanismWorking() {
return spanIdGenerator > Config.Agent.SPAN_LIMIT_PER_SEGMENT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this express should be >=, because the spanIdGenerator value is start from 0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acurtain You can change that through a pull request. If this is a bug, we have nothing to discuss, just need a fix. Right?

@ascrutae
Copy link
Member

ascrutae commented Nov 12, 2017

Normal

  • Topological graph

normal_topological_graph

  • Trace segment

normal_trace_segment_graph

  • Service Tree:

normal_service_tree

Limit (limitcount = 1)

  • Topological graph

limit_topological_graph

  • Trace segment

wx20171115-114738 2x

  • Service tree

limit_service_tree

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 0eb0907 on feature/agent-memory-control into ** on feature/collector-modelization**.

…ry-control

* feature/collector-modelization: (55 commits)
  Change the exception to runtime exception in module find and service find method.
  Register graph finish.
  Application register test success.
  Fix a code style issue.
  Move instruments into an independency module in collector, named `apm-collector-instrument`.
  Remove ServiceInstrumentation mechanism for further collector agent design.
  Adjust startup sequence.
  cluster, naming, grpc manager, jetty manager, storage modules test successful.
  Segment standardization
  Parse and listener
  trace workers
  Register workers
  no message
  Add cache service manager in worker construction.
  Fix compile issues.
  Support WayToNode for entry node.
  JVM worker
  Use cache service from cache module.
  Refactor cache module to provide cache services.
  Fix a pom confilct.
  ...
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 41e459d on feature/agent-memory-control into ** on feature/collector-modelization**.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 23.05% when pulling 2d80d8d on feature/agent-memory-control into b744d40 on feature/collector-modelization.

Copy link
Member

@ascrutae ascrutae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wu-sheng wu-sheng merged commit 4a2e1bc into feature/collector-modelization Nov 15, 2017
@wu-sheng wu-sheng deleted the feature/agent-memory-control branch November 15, 2017 04:31
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

Successfully merging this pull request may close these issues.

None yet

3 participants