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

Update ngx_http_opentelemetry_module.c #524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -696,15 +696,15 @@ static ngx_int_t ngx_http_opentelemetry_init(ngx_conf_t *cf)
ngx_uint_t phase_index;
ngx_int_t res;

ngx_writeError(cf->cycle->log, __func__, "Starting Opentelemetry Module init");
ngx_writeTrace(cf->cycle->log, __func__, "Starting Opentelemetry Module init"); // Log only with tracing

cp = ap = pap = srp = prp = rp = lp = pcp = 0;

res = -1;

cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);

ngx_writeError(cf->cycle->log, __func__, "Registering handlers for modules in different phases");
ngx_writeTrace(cf->cycle->log, __func__, "Registering handlers for modules in different phases"); // Log only with tracing

for (m = 0; cf->cycle->modules[m]; m++) {
if (cf->cycle->modules[m]->type == NGX_HTTP_MODULE) {
Expand Down Expand Up @@ -800,7 +800,7 @@ static ngx_int_t ngx_http_opentelemetry_init(ngx_conf_t *cf)
/* hostname is extracted from the nginx cycle. The attribute hostname is needed
for OTEL spec and the only place it is available is cf->cycle
*/
ngx_writeError(cf->cycle->log, __func__, "Opentelemetry Module init completed!");
ngx_writeTrace(cf->cycle->log, __func__, "Opentelemetry Module init completed!");// Log only with tracing

return NGX_OK;
}
Expand All @@ -813,7 +813,7 @@ static ngx_int_t ngx_http_opentelemetry_init_worker(ngx_cycle_t *cycle)
int p = getpid();
char * s = (char *)ngx_pcalloc(cycle->pool, 6);
sprintf(s, "%d", p);
ngx_log_error(NGX_LOG_ERR, cycle->log, 0, "mod_opentelemetry: ngx_http_opentelemetry_init_worker: Initializing Nginx Worker for process with PID: %s", s);
ngx_writeTrace(NGX_LOG_ERR, cycle->log, 0, "mod_opentelemetry: ngx_http_opentelemetry_init_worker: Initializing Nginx Worker for process with PID: %s", s); // Log only with tracing

/* Allocate memory for worker configuration */
worker_conf = ngx_pcalloc(cycle->pool, sizeof(ngx_http_opentelemetry_worker_conf_t));
Expand Down
Loading