@@ -95,40 +95,68 @@ ddog_MaybeError ddog_sidecar_connect(struct ddog_SidecarTransport **connection);
9595/**
9696 * Start master listener thread for thread-based connections (Unix only).
9797 *
98- * This spawns a listener thread that accepts worker connections.
98+ * This spawns a listener thread that accepts worker connections. Only one
99+ * master listener can be active per process.
100+ *
101+ * # Arguments
102+ * * `pid` - Process ID that owns this listener
103+ *
104+ * # Returns
105+ * * `MaybeError::None` on success
106+ * * `MaybeError::Some(Error)` on failure
99107 */
100- #if !defined(_WIN32 )
101108ddog_MaybeError ddog_sidecar_connect_master (int32_t pid );
102- #endif
103109
104110/**
105111 * Connect as worker to master listener thread (Unix only).
112+ *
113+ * Establishes a connection to the master listener for the given PID.
114+ *
115+ * # Arguments
116+ * * `pid` - Process ID of the master process
117+ * * `connection` - Output parameter for the connection
118+ *
119+ * # Returns
120+ * * `MaybeError::None` on success
121+ * * `MaybeError::Some(Error)` on failure
106122 */
107- #if !defined(_WIN32 )
108- ddog_MaybeError ddog_sidecar_connect_worker (int32_t pid ,
109- struct ddog_SidecarTransport * * connection );
110- #endif
123+ ddog_MaybeError ddog_sidecar_connect_worker (int32_t pid , struct ddog_SidecarTransport * * connection );
111124
112125/**
113126 * Shutdown the master listener thread (Unix only).
127+ *
128+ * Sends shutdown signal and joins the listener thread. This is blocking.
129+ *
130+ * # Returns
131+ * * `MaybeError::None` on success
132+ * * `MaybeError::Some(Error)` on failure
114133 */
115- #if !defined(_WIN32 )
116134ddog_MaybeError ddog_sidecar_shutdown_master_listener (void );
117- #endif
118135
119136/**
120137 * Check if master listener is active for the given PID (Unix only).
138+ *
139+ * Used for fork detection.
140+ *
141+ * # Arguments
142+ * * `pid` - Process ID to check
143+ *
144+ * # Returns
145+ * * `true` if listener is active for this PID
146+ * * `false` otherwise
121147 */
122- #if !defined(_WIN32 )
123148bool ddog_sidecar_is_master_listener_active (int32_t pid );
124- #endif
125149
126150/**
127151 * Clear inherited master listener state in child after fork (Unix only).
152+ *
153+ * Child processes must call this to avoid using the parent's listener.
154+ *
155+ * # Returns
156+ * * `MaybeError::None` on success
157+ * * `MaybeError::Some(Error)` on failure
128158 */
129- #if !defined(_WIN32 )
130159ddog_MaybeError ddog_sidecar_clear_inherited_listener (void );
131- #endif
132160
133161ddog_MaybeError ddog_sidecar_ping (struct ddog_SidecarTransport * * transport );
134162
@@ -156,7 +184,8 @@ ddog_MaybeError ddog_sidecar_telemetry_enqueueConfig(struct ddog_SidecarTranspor
156184 ddog_CharSlice config_key ,
157185 ddog_CharSlice config_value ,
158186 enum ddog_ConfigurationOrigin origin ,
159- ddog_CharSlice config_id );
187+ ddog_CharSlice config_id ,
188+ struct ddog_Option_U64 seq_id );
160189
161190/**
162191 * Reports a dependency to the telemetry.
0 commit comments