def METHOD_NAME(tracer: Tracer):
    with tracer.start_as_current_span(
        "test_request", attributes={"http.url": "http://localhost"}, kind=SpanKind.SERVER
    ):
        pass
    with tracer.start_as_current_span(
        "test_messaging", attributes={"messaging.system": "kafka"}, kind=SpanKind.CONSUMER
    ):
        pass
    client = tracer.client
    transaction1 = client.events[constants.TRANSACTION][0]
    transaction2 = client.events[constants.TRANSACTION][1]
    assert transaction1["type"] == "request"
    assert transaction2["type"] == "messaging"
    assert transaction1["otel"]["span_kind"] == "SERVER"
    assert transaction1["otel"]["attributes"]["http.url"] == "http://localhost"