def METHOD_NAME(self, **kwargs):
    provider = kwargs.get("tracer_provider", None) or get_tracer_provider()
    old_factory = logging.getLogRecordFactory()
    LoggingInstrumentor._old_factory = old_factory
    LoggingInstrumentor._log_hook = kwargs.get("log_hook", None)
    service_name = None
    def record_factory(*args, **kwargs):
        record = old_factory(*args, **kwargs)
        record.otelSpanID = "0"
        record.otelTraceID = "0"
        record.otelTraceSampled = False
        nonlocal service_name
        if service_name is None:
            resource = getattr(provider, "resource", None)
            if resource:
                service_name = (
                    resource.attributes.get("service.name") or ""
                )
            else:
                service_name = ""
        record.otelServiceName = service_name
        span = get_current_span()
        if span != INVALID_SPAN:
            ctx = span.get_span_context()
            if ctx != INVALID_SPAN_CONTEXT:
                record.otelSpanID = format(ctx.span_id, "016x")
                record.otelTraceID = format(ctx.trace_id, "032x")
                record.otelTraceSampled = ctx.trace_flags.sampled
                if callable(LoggingInstrumentor._log_hook):
                    try:
                        LoggingInstrumentor._log_hook(  # pylint: disable=E1102
                            span, record
                        )
                    except Exception:  # pylint: disable=W0703
                        pass
        return record
    logging.setLogRecordFactory(record_factory)
    set_logging_format = kwargs.get(
        "set_logging_format",
        environ.get(OTEL_PYTHON_LOG_CORRELATION, "false").lower()
        == "true",
    )
    if set_logging_format:
        log_format = kwargs.get(
            "logging_format", environ.get(OTEL_PYTHON_LOG_FORMAT, None)
        )
        log_format = log_format or DEFAULT_LOGGING_FORMAT
        log_level = kwargs.get(
            "log_level", LEVELS.get(environ.get(OTEL_PYTHON_LOG_LEVEL))
        )
        log_level = log_level or logging.INFO
        logging.basicConfig(format=log_format, level=log_level)