OpenTelemetry Collector Connection error when installing the latest release 4.53.0 during `docker build`
Author: ancalita
Pull request: no
Labels: name: bug

### System Info

**System Info**:
```
- `transformers` version: 4.53.0
- Platform: macOS-15.5-arm64-arm-64bit
- Python version: 3.10.16
- Huggingface_hub version: 0.33.1
- Safetensors version: 0.5.3
- Accelerate version: not installed
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.7.1 (NA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: <fill in>

```

**Issue Description**:

I have an indirect dependency on `transformers` via `gliner` package which I use to download and save a HF model in a custom Dockerfile for my project. When building the image and running the step that runs the below script, I get a ton of ConnectionErrors. When I downgrade `transformers` to `4.52.4`, I don't see these ConnectionErrors anymore.

Example script:
```
from gliner import GLiNER
import os

def download_model(model_path: str, model_name: str) -> None:
    """Download a Gliner model to the specified directory."""
    # Check if the directory already exists
    if not os.path.exists(model_path):
        # Create the directory
        os.makedirs(model_path)
    model = GLiNER.from_pretrained(model_name)
    model.save_pretrained(model_path)

if __name__ == "__main__":
    download_model(
        model_path="/app/models/gliner/",
        model_name="urchade/gliner_multi_pii-v1"
    )
```

Errors:
```
#9 [5/7] RUN python3 -m gliner_model_download_script
#9 3.744 Exception while exporting metrics HTTPConnectionPool(host='localhost', port=4318): Max retries exceeded with url: /v1/metrics (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff29492020>: Failed to establish a new connection: [Errno 111] Connection refused'))
#9 3.744 Traceback (most recent call last):
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
#9 3.744     sock = connection.create_connection(
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
#9 3.744     raise err
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
#9 3.744     sock.connect(sa)
#9 3.744 ConnectionRefusedError: [Errno 111] Connection refused
#9 3.744 
#9 3.744 The above exception was the direct cause of the following exception:
#9 3.744 
#9 3.744 Traceback (most recent call last):
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
#9 3.744     response = self._make_request(
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 493, in _make_request
#9 3.744     conn.request(
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connection.py", line 445, in request
#9 3.744     self.endheaders()
#9 3.744   File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
#9 3.744     self._send_output(message_body, encode_chunked=encode_chunked)
#9 3.744   File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
#9 3.744     self.send(msg)
#9 3.744   File "/usr/lib/python3.10/http/client.py", line 976, in send
#9 3.744     self.connect()
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connection.py", line 276, in connect
#9 3.744     self.sock = self._new_conn()
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
#9 3.744     raise NewConnectionError(
#9 3.744 urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xffff29492020>: Failed to establish a new connection: [Errno 111] Connection refused
#9 3.744 
#9 3.744 The above exception was the direct cause of the following exception:
#9 3.744 
#9 3.744 Traceback (most recent call last):
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/requests/adapters.py", line 667, in send
#9 3.744     resp = conn.urlopen(
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 841, in urlopen
#9 3.744     retries = retries.increment(
#9 3.744   File "/opt/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 519, in increment
#9 3.744     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
```


### Who can help?

@richardliaw 
@amogkam

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Create a custom dockerfile that installs latest gliner then runs the script shared above, example:

```
...

RUN python3 -m venv /opt/venv &&  \
    . /opt/venv/bin/activate &&  \
    pip install --no-cache-dir -U "pip==24.*" &&  \
    pip install --no-cache-dir "gliner==0.2.21"

# Download HF model
COPY ./models /app/models
COPY ./gliner_model_download_script.py gliner_model_download_script.py
RUN python3 -m gliner_model_download_script

RUN ls -l /app/models/gliner
```
Then run `docker build .`

### Expected behavior

No connection errors raised.

Comments:
@ancalita My guess it's connected to this - https://github.com/huggingface/transformers/issues/39115 

cc @McPatate 

#39422 should also close this as OT returns by default (IIUC) a no-op meter/tracer when no meter/tracer is set.

Closing then!