Issue with elastic rum agent

Hey guys
hope you are doing great
i am having an issue with elastic rum agent.
i have a next.js application and i added the agent config to my _app.tsx:

import { init as initApm } from '@elastic/apm-rum'
var apm = initApm({
  serviceName: 'test',

  serverUrl: 'https://10.1.36.159:8200',

  serviceVersion: '',

  environment: 'testenv'
})

after the last import.
also have the dependency installed but when i log the agent object with console it reports this :

ApmBase {
  _disable: true,
  serviceFactory: ServiceFactory { instances: {}, initialized: false },
  _initialized: false
}

obviously its not disabled .
so what could be the issue ? like do i have to do anything else beside this?
i followed the official document.
thanks inadvance

Hi @Ehsan_Eskandary,

Welcome to the community! Can you share which version of the RUM agent you are using? Are there any error or warning messages in the console logs at all?

I also assume that your Elastic APM server is available at the serverUrl? Can you also confirm you have enabled the APM server on your cluster and you're not receiving any messages?

Let us know!