Skip to content

Commit

Permalink
docs: comment updates about modack spans
Browse files Browse the repository at this point in the history
  • Loading branch information
feywind committed Mar 14, 2024
1 parent 85d34b7 commit adf3be3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ export class SubscriberSpans {
}

// Emit an event for calling modAck.
// Note that we don't currently support users calling modAck directly, but
// this may be used in the future for things like fully managed pull
// subscriptions.
modAckCall(deadline: Duration) {
if (this.processing) {
tracing.PubsubEvents.modAckCalled(this.processing, deadline);
Expand Down Expand Up @@ -244,12 +247,12 @@ export class Message implements tracing.MessageWithAttributes {
parentSpan?: tracing.Span;

/**
* @private
* @internal
*
* We'll save the state of the subscription's exactly once delivery flag at the
* time the message was received. This is pretty much only for tracing, as we will
* generally use the live state of the subscription to figure out how to respond.
*
* @private
* @internal
*/
isExactlyOnceDelivery: boolean;

Expand Down Expand Up @@ -441,6 +444,7 @@ export class Message implements tracing.MessageWithAttributes {

/**
* Modifies the ack deadline.
* At present time, this should generally not be called by users.
*
* @param {number} deadline The number of seconds to extend the deadline.
* @private
Expand All @@ -455,6 +459,7 @@ export class Message implements tracing.MessageWithAttributes {
/**
* Modifies the ack deadline, expecting a response (for exactly-once delivery subscriptions).
* If exactly-once delivery is not enabled, this will immediately resolve successfully.
* At present time, this should generally not be called by users.
*
* @param {number} deadline The number of seconds to extend the deadline.
* @private
Expand Down

0 comments on commit adf3be3

Please sign in to comment.