def METHOD_NAME(m2ee):
    """
    Injects Dynatrace configuration to java runtime
    """
    if not is_agent_enabled():
        logging.debug(
            "Skipping Dynatrace OneAgent setup, required env vars are not set"
        )
        return
    logging.info("Enabling Dynatrace OneAgent")
    try:
        manifest = get_manifest()
    except Exception:
        logging.warning("Failed to parse Dynatrace manifest file", exc_info=True)
        return
    agent_path = get_agent_path()
    logging.debug("Agent path: [%s]", agent_path)
    if not os.path.exists(agent_path):
        raise Exception(f"Dynatrace Agent not found: {agent_path}")
    # dynamic default
    default_env.update({"DT_TENANTTOKEN": manifest.get("tenantToken")})
    for key, dv in default_env.items():
        value = os.environ.get(key, dv)
        if value is not None:
            util.upsert_custom_environment_variable(m2ee, key, value)
    util.upsert_custom_environment_variable(
        m2ee, "DT_CONNECTION_POINT", get_connection_endpoint()
    )
    util.upsert_javaopts(
        m2ee,
        [
            f"-agentpath:{os.path.abspath(agent_path)}",
            "-Xshare:off",
        ],
    )