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

provide a way to know when flush is finished #1154

Merged
merged 2 commits into from
Nov 11, 2020
Merged

Conversation

bengl
Copy link
Collaborator

@bengl bengl commented Nov 11, 2020

What does this PR do?

Adds a completion callback to Writer#flush.

Motivation

There are planned internal additions that will require knowing that a flush has
completed.

@bengl bengl requested a review from a team as a code owner November 11, 2020 19:42
then (fulfilled) {
// We're not ever going to reject, because users of the thenable are
// only concerned about completion, rather than success.
done = fulfilled
Copy link
Member

Choose a reason for hiding this comment

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

What if then is called after the operation is done?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah thenables may not be the right approach.

@bengl bengl changed the title return a thenable from flush provide a way to know when flush is finished Nov 11, 2020
@bengl bengl merged commit 527286f into master Nov 11, 2020
Czechh added a commit that referenced this pull request Dec 1, 2020
…rada/add-trace-to-lambda-invoke

* 'master' of github.com:DataDog/dd-trace-js:
  fix graphql plugin error when using sampling (#1164)
  v0.29.0 (#1160)
  fix mongodb integration not instrumenting correctly (#1159)
  clean up test scripts (#1158)
  fix consumer span not waiting for message ack before finishing (#1152)
  provide a way to know when flush is finished (#1154)
  add experimental option to mark internal spans on errors (#1153)
  Remove only from it, probably left in by accident (#1149)
  add support for @grpc/grpc-js (#1147)
  remove idle call frame samples from profiles (#1143)
  fix socket connect callback not running in parent scope (#1142)
  add a fast path in toArray for length-8 IDs (#1138)
  Fix GraphQL span finishTime calculation (#1139)
  v0.28.0 (#1137)
  skip browser test for setUrl (#1135)
  fix ingestion rate limiter drifting on interval change (#1132)
@tlhunter tlhunter deleted the bengl/thenable-flush branch January 19, 2024 22:16
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

2 participants